Aragornkk
Senior User
- Joined
- Oct 11, 2008
- Messages
- 705
- Reaction score
- 44
Odp: tibia 8.2-8.5 Quest z zabiciem potwora
Witam, zrobi?em kolejn? przer?bk? tego skryptu. Podobna do Gelia tylko nie ma bugu.
Nazywa si?, zanim we?miesz nagrod? zabij potwory.
actions
creaturescripts
login.lua
Oraz xml.
Witam, zrobi?em kolejn? przer?bk? tego skryptu. Podobna do Gelia tylko nie ma bugu.
Nazywa si?, zanim we?miesz nagrod? zabij potwory.
actions
Code:
function onUse(cid, item, frompos, item2, topos)
local monsters = {"rat", "rat", "rat", "rat"}
local positions = {{x=150, y=56, z=6}, {x=151, y=56, z=6}, {x=151, y=57, z=6}, {x=152, y=56, z=6}}
if getPlayerStorageValue(cid, 9999)==-1 then
for i=1, #monsters do
doSummonCreature(monsters[i], positions[i])
end
setPlayerStorageValue(cid,9999,1)
doPlayerSendTextMessage(cid,22,"To plapka!Co to za bestie?")
elseif getPlayerStorageValue(cid, 9999)==5 then
doPlayerSendTextMessage(cid,22,"Teraz moge bezpiecznie wziasc nagrode!")
doPlayerAddItem(cid,nagroda,ile)
setPlayerStorageValue(cid,9999,6)
elseif getPlayerStorageValue(cid, 9999)==6 then
doPlayerSendTextMessage(cid,22,"Nic tu nie ma!")
else
doPlayerSendTextMessage(cid,22,"Wpierw musze zabic potwory!!")
end
end
Code:
function onKill(cid, target)
if isPlayer(target) == FALSE then
if getPlayerStorageValue(cid, 9999)==1 and (getCreatureName(target) == "rat") and getPlayerStorageValue(cid, 9999)<=5 then
doPlayerSendTextMessage(cid,22,"Zostalo mi jeszcze 3 sztuki do zabicia")
setPlayerStorageValue(cid,9999,(getPlayerStorageValue(cid, 9999)+1))
elseif getPlayerStorageValue(cid, 9999)==2 and (getCreatureName(target) == "rat") then
doPlayerSendTextMessage(cid,22,"Zostalo mi jeszcze 2 sztuki do zabicia")
setPlayerStorageValue(cid,9999,(getPlayerStorageValue(cid, 9999)+1))
elseif getPlayerStorageValue(cid, 9999)==3 and (getCreatureName(target) == "rat") then
doPlayerSendTextMessage(cid,22,"Zostalo mi jeszcze 1 sztuki do zabicia")
setPlayerStorageValue(cid,9999,(getPlayerStorageValue(cid, 9999)+1))
elseif getPlayerStorageValue(cid, 9999)==4 and (getCreatureName(target) == "rat") then
doPlayerSendTextMessage(cid,22,"Dobra, juz moge wziasc nagrode!!")
setPlayerStorageValue(cid,9999,(getPlayerStorageValue(cid, 9999)+1))
end
end
return TRUE
end
Code:
registerCreatureEvent(cid, "quest")
Oraz xml.