tonywilliamson
Technical User
HI, i am trying to create a script for a game which sets some items as a key item and then doesn't go into your inventory. My problem is although i have set the items which should be key items everything seems to be considered as one.
Thanks in advance for any help
----------------------------------------
set keyitemslist = ["Oraku's Orb", "Herb", "Portal"]
repeat with i = 1 to keyitemslist.count
if nitem = keyitemslist then set keyitem = TRUE
end repeat
if KeyItem = TRUE then
set kifile = "c:\fsoserver\DAT\Kitem\" & user.name & ".txt"
set mykitemlist = list(string(file(kifile).read))
repeat with i = 1 to mykitemlist.count
if nitem = mykitemlist(i) then
set thetext = "You have already aqquired this key item"
user.sendmessage("sqa", TheText, 0, FALSE, user.name)
file("C:\FSOServer\DAT\ITEMS\" & FilName).write(ItemList)
exit
end if
end repeat
add(mykitemlist, nItem)
set thetext = "You have just aqquired a key item"
user.sendmessage("sqa", TheText, 0, FALSE, user.name)
set mykitemlist = string(mykitemlist)
file(kifile).write(mykitemlist)
file("C:\FSOServer\DAT\ITEMS\" & FilName).write(ItemList)
exit
end if
-----------------------------
Thanks in advance for any help
----------------------------------------
set keyitemslist = ["Oraku's Orb", "Herb", "Portal"]
repeat with i = 1 to keyitemslist.count
if nitem = keyitemslist then set keyitem = TRUE
end repeat
if KeyItem = TRUE then
set kifile = "c:\fsoserver\DAT\Kitem\" & user.name & ".txt"
set mykitemlist = list(string(file(kifile).read))
repeat with i = 1 to mykitemlist.count
if nitem = mykitemlist(i) then
set thetext = "You have already aqquired this key item"
user.sendmessage("sqa", TheText, 0, FALSE, user.name)
file("C:\FSOServer\DAT\ITEMS\" & FilName).write(ItemList)
exit
end if
end repeat
add(mykitemlist, nItem)
set thetext = "You have just aqquired a key item"
user.sendmessage("sqa", TheText, 0, FALSE, user.name)
set mykitemlist = string(mykitemlist)
file(kifile).write(mykitemlist)
file("C:\FSOServer\DAT\ITEMS\" & FilName).write(ItemList)
exit
end if
-----------------------------