Skrypty & Kody [8.0][Actions] Questy

Status
Zamknięty.

arcane

Active User
Zarejestrowany
Dołączył
Styczeń 5, 2013
Posty
73
Liczba reakcji
1
Witam, jak zrobi?, aby quest mo?na by?o wykona? dowoln? ilo?? razy ?

[LUA]function onUse(cid, item, frompos, item2, topos)

if item.uid == 7207 then
queststatus = getPlayerStorageValue(cid,7207)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Scroll 250 lvl.")
doPlayerAddItem(cid,7431,2)
setPlayerStorageValue(cid,7207,1)
else
doPlayerSendTextMessage(cid,22,"There is nothing inside.")
end
elseif item.uid == 7208 then
queststatus = getPlayerStorageValue(cid,7208)
if queststatus == -1 then
doPlayerSendTextMessage(cid,22,"Scroll 250 lvl.")
doPlayerAddItem(cid,7431,2)
setPlayerStorageValue(cid,7208,1)
else
doPlayerSendTextMessage(cid,22,"There is nothing inside.")
end
return 1
end
[/LUA]

Oto fragment kodu, mo?e mi go kto? przerobi? ?
 
Odp: [8.0][Actions] Questy

function onUse(cid, item, frompos, item2, topos)

if item.uid == 7207 then
doPlayerSendTextMessage(cid,22,"Scroll 250 lvl.")
doPlayerAddItem(cid,7431,2)
elseif item.uid == 7208 then
doPlayerSendTextMessage(cid,22,"Scroll 250 lvl.")
doPlayerAddItem(cid,7431,2)
end
return 1
end
 
Odp: [8.0][Actions] Questy

Po prostu pokasuj wszystko z "PlayerStorageValue" i "queststatus", przy tym nie zapominaj, ?e jak kasujesz "if" to kasuj te? "end".
 
Status
Zamknięty.
Back
Do góry