Odp: Skrypt Npc i potworek
Caretures
function onKill(cid, target)
local name = getCreatureName(target)
local storage = getPlayerStorageValue(cid,56435)
if(isMonster(target) == TRUE) then
if storage == 0 then
if name == "Dragon Boss" then
doPlayerSay(cid, 'misja zaliczona!', TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 56435, 1)
end
end
end
return true
end
---------- Tre?? dodana o 13:04 ----------
elseif(msgcontains(msg, 'dragon')) then
if (getPlayerStorageValue(cid,56435) == 1) then
selfSay('Find the {Boss Dragon} and kill him!', cid)
else
selfSay('Are you sure want to ride on Dragon?', cid)
talkState[talkUser] = 4
end
elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 4) then
if getPlayerLevel(cid) >= 800 then
if (getPlayerStorageValue(cid,75126) ~= 1) then
selfSay('Not done mission. Say {mission}', cid)
talkState[talkUser] = 8
else
if(getGlobalStorageValue(56126) ~= 1) then
for x = cleandragon.from.x, cleandragon.to.x do
for y = cleandragon.from.y, cleandragon.to.y do
for z = cleandragon.from.z, cleandragon.to.z do
areapos = {x = x, y = y, z = z, stackpos = 253}
getMonsters = getThingfromPos(areapos)
if isMonster(getMonsters.uid) then
doRemoveCreature(getMonsters.uid)
end
end
end
end
doTeleportThing(cid, dragon)
doCreateMonster("Dragon Special", dragonmonster)
setGlobalStorageValue(56126, 1)
else
selfSay('The room is busy, you must wait!', cid)
end
end
else
selfSay('You dont have 800 lvl!', cid)
end