Odp: NPC sprzedaj?cy czary
Pobawi? si? z tym robieniem samodzielnie, ale zajmie mi to z 10h. Czekam dalej na skrypt lua do tego szitowca sellera czar?w.
local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
Nie umiem przerobi? tego skryptu nawet. To nie macie co mi m?wi? robieniu skrypt?w samodzielnie.
EDIT
Dobra jest git. Mam skrypt ?eby uczy? si? czar?w, ale mam k?opot, bo nie potrafi? dorobi? skryptu sprawdzaj?cego czy czar zosta? ju? nauczony. Oto m?j skrypt:
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
if msgcontains(msg, "learn Club stun") then
if(doPlayerRemoveItem(cid, 2148, 1)) then
doPlayerLearnInstantSpell(cid, "Club stun")
selfSay("nauczyles sie.", cid)
else
selfSay("potrzebuje kasy.", cid)
end
end
return true
end
pomo?e mi kto?? Pierdziele si? z tym ju? jaki? miesi?c i nie mog? sobie z tym poradzi?.