Postado Fevereiro 9, 2016 9 anos Sera que alguem me ajuda a converter essa script abaixo, pelo que vi nao tem aqui no forum ela: /*/data/npc create Testserver Assistant.xml and add Code: <?xml version="1.0" encoding="UTF-8"?> <npc name="Testserver Assistant" script="testserver_assistant.lua" walkinterval="4000" floorchange="0"> <health now="100" max="100"/> <look type="73" /> <parameters> <parameter key="message_greet" value="Hey |PLAYERNAME|. I'm Testserver Assistant and can give {money} and {experience} which will be useful for testing on Exodum server."/> <parameter key="message_farewell" value="Good bye!"/> <parameter key="message_walkaway" value="Good bye!" /> </parameters> </npc> /*/data/npc/scripts create testserver_assistant.lua and add Code: --EXODUM OTS --BY SZAFI (Old Sessam) --http://tibia.net.pl/members/156613-Old-Sessam --http://otland.net/members/szafi.32524/ --skype: sessam5 local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end --DAWANIE 10 CRYSTAL COINS local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, "money") then selfSay("Do you want 10 crystal coins?", cid) talkState[talkUser] = 1 elseif msgcontains(msg, "yes") and talkState[talkUser] == 1 then selfSay("Here you are.", cid) doPlayerAddItem(cid, 2160, 10) talkState[talkUser] = 0 if(not npcHandler:isFocused(cid)) then return false end --DAWANIE 254237300 EXPA elseif msgcontains(msg, "experience") then selfSay("Do you want experience?", cid) talkState[talkUser] = 2 elseif msgcontains(msg, "yes") and talkState[talkUser] == 2 and getPlayerStorageValue(cid, 15211) == 1 then selfSay("Sorry. Experience I can add only one time per character.", cid) elseif getPlayerStorageValue(cid, 15211) == -1 then selfSay("Here you are.", cid) doPlayerAddExp(cid, 254237300) doCreatureSetStorage(cid, 15211, 1) talkState[talkUser] = 0 if(not npcHandler:isFocused(cid)) then return false end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.