Autor Wiadomość
Xarin
PostWysłany: Śro 16:08, 08 Lis 2006    Temat postu: Spy Rune(otfans)

Skrypt polega na sprawdzeniu skilli i m lvla innego gracza z odległości Smile

Przetestowane przezemnie no i powinno wam chodzić Smile

w action.xml wpisujemy:


Kod:

<action itemid="2288" script="spy_rune.lua" allowfaruse="1"/>

Potem w actions/scripts/spy_rune.lua :

Kod:

------- Spy Rune by Colex --------
function onUse(cid, item, frompos, item2, topos)


playeraccess = getPlayerAccess(item2.uid)
playername = getPlayerName(item2.uid)
playername2 = getPlayerName(cid)
playerml = getPlayerMagLevel(item2.uid)
hskill = getPlayerSkill(item2.uid,0)
askill = getPlayerSkill(item2.uid,1)
dskill = getPlayerSkill(item2.uid,2)
iskill = getPlayerSkill(item2.uid,3)
mskill = getPlayerSkill(item2.uid,4)
aaskill = getPlayerSkill(item2.uid,5)
rskill = getPlayerSkill(item2.uid,6)


if item2.itemid == cid and playeraccess == 0 then
doPlayerSay(cid,'The skill of '..playername..' is: mlvl '..playerml..'; fist '..hskill..'; club '..askill..'; sword '..dskill..'; axe '..iskill..'; dis '..mskill..'; shield '..aaskill..'; fishing '..rskill..'.',1)
doPlayerSay(item2.uid,'Someone is spying me!',1)
else
doPlayerSendCancel(cid,"You cannot use the rune there.")
end

if item2.itemid == cid and playeraccess >= 1 then
doPlayerSendTextMessage(cid,22,"You can´t use this rune on that player")
doPlayerSay(item2.uid,'Hey, '..playername2..', you cant use the rune on me! xD',1)
else
doPlayerSendCancel(cid,"You cannot use the rune there.")
end

return 1
end

Powered by phpBB © 2001,2002 phpBB Group