Maxwel1
Legend Of Everything
ok here we go ans wish someone really help. i was thinking about doing 2 talkactions 1st is to additem to the player (!reward (player name)) and with that command i will give the player a special item with uid (unique id) . why uniqueid? u will know in the next command.
here is the first script for the !reward command. for sure it's not working that's why i am posting in the support section. the error is: [14/02/2009 06:56:17] Warning: [Event::loadScript] Can not load script. data/talkactions/scripts/additem.lua
[14/02/2009 06:56:17] data/talkactions/scripts/additem.lua:12: '<eof>' expected near 'else'
The script:
The 2nd command is the opposite it's !unreward this command remove that item that got the uid from anywhere if the player put it in a house in the depot or even fell from him when he died and another player looted it. that's why i need the item to have uid. yea for sure that item will be only one in the whole server. i know that and i want that really
the error of the second command:
[14/02/2009 06:56:17] Warning: [Event::loadScript] Can not load script. data/talkactions/scripts/removeitem.lua
[14/02/2009 06:56:17] data/talkactions/scripts/removeitem.lua:5: '<eof>' expected near 'end'
the script of the second command:
yea, i am sure i missed alot of part in that script but i am still learning and the best thing for learning is trying to do something like never made b4 and try to know ur mistakes. but this is not a test script i really need that script and i am sure later ppl will need it as it will be soo useful to do with it alot of events....
if u helped me. will be soo much appreciated but if u know the solution and didn't help that will be soo mean. cuz when u help someone today another will help u later
Thanks alot
Yours:
Lion
here is the first script for the !reward command. for sure it's not working that's why i am posting in the support section. the error is: [14/02/2009 06:56:17] Warning: [Event::loadScript] Can not load script. data/talkactions/scripts/additem.lua
[14/02/2009 06:56:17] data/talkactions/scripts/additem.lua:12: '<eof>' expected near 'else'
The script:
Code:
functionOnSay(cid, words, param)
local player = functiontogetplayergroupbyname(param)
local itemid = 2473 --place the id here
local uid = 23223 --place the uid here
getplayergroupbyname(param)
doPlayerAddItem(uid, itemid, 1, 0)
else
doPlayerSendCancel(cid,"You need to enter a player.")
end
The 2nd command is the opposite it's !unreward this command remove that item that got the uid from anywhere if the player put it in a house in the depot or even fell from him when he died and another player looted it. that's why i need the item to have uid. yea for sure that item will be only one in the whole server. i know that and i want that really
the error of the second command:
[14/02/2009 06:56:17] Warning: [Event::loadScript] Can not load script. data/talkactions/scripts/removeitem.lua
[14/02/2009 06:56:17] data/talkactions/scripts/removeitem.lua:5: '<eof>' expected near 'end'
the script of the second command:
Code:
functionOnSay(cid, words, param)
local itemid = 2473
local uid = 23223
doRemoveItem(uid, 1)
end
yea, i am sure i missed alot of part in that script but i am still learning and the best thing for learning is trying to do something like never made b4 and try to know ur mistakes. but this is not a test script i really need that script and i am sure later ppl will need it as it will be soo useful to do with it alot of events....
if u helped me. will be soo much appreciated but if u know the solution and didn't help that will be soo mean. cuz when u help someone today another will help u later
Thanks alot
Yours:
Lion