notle.com 2 #1 Postado 20 Março, 2013 (editado) fala galera como vai vcs? bom criei mais um sistema bem legal nome troca troca como ele funciona vocês vai criar uma runa que assim que vc click no player vai troca a área do player x pela a área do player y no caso vc player x vai em data\lib entra no 050-function coloca isso la lembrando tem uns ot que nome é só function function savePosition(cid) RETORNAR = {x = getPlayerStorageValue(cid, 20004), y = getPlayerStorageValue(cid, 20005), z = getPlayerStorageValue(cid, 20006)} local PLAYER = getPlayerGUID(cid) addEvent(function() if isCreature(cid) then setPlayerStorageValue(PLAYER, 20007, 0) else db.executeQuery("DELETE FROM `player_storage` WHERE `key` = 20003 AND `player_id` = " .. getPlayerGUID(cid) .. ";") end end) end agora vai em data\actions\scripts\ cria nomedarune.lua cola la function onUse(cid, item, frompos, item2, topos) rune = true -- rune infinita muda para false if not isPlayer(item2.uid) then doPlayerSendTextMessage(cid,27,"click no player não em bicho") return true end if getPlayerStorageValue(cid, 20007) <= 0 then setPlayerStorageValue(cid, 20004, getCreaturePosition(cid).x) setPlayerStorageValue(cid, 20005, getCreaturePosition(cid).y) setPlayerStorageValue(cid, 20006, getCreaturePosition(cid).z) setPlayerStorageValue(cid, 20007, 1) savePosition(cid) doTeleportThing(cid,getThingPos(item2.uid)) doPlayerSendTextMessage(cid,27,"Você Trocou De Lugar Com ["..getCreatureName(item2.uid).."]") doSendMagicEffect(getThingPos(cid),28) doSendAnimatedText(getThingPos(cid),"Troca",math.random(1,255)) if getPlayerStorageValue(cid, 20007) > 0 then doTeleportThing(item2.uid, RETORNAR) doSendMagicEffect(RETORNAR,28) doSendAnimatedText(RETORNAR,"Troca",math.random(1,255)) doPlayerSendTextMessage(item2.uid,27,"["..getCreatureName(cid).."] Escolheu Você Para Troca De Lugar") setPlayerStorageValue(cid, 20004, 0) setPlayerStorageValue(cid, 20005, 0) setPlayerStorageValue(cid, 20006, 0) setPlayerStorageValue(cid, 20007, 0) if rune == true then doRemoveItem(item.uid) end return true end return true end end actions.xml <action itemid="ID_DA_Rune" script="nomedarune.lua" allowfaruse="1"/> mais detalhes http://www.youtube.com/watch?feature=player_embedded&v=gdFq8cTR6VA Editado 20 Março, 2013 por notle.com Compartilhar este post Link para o post
iuniX 4 #2 Postado 31 Maio, 2013 Eu realmente não aconselho o uso desse script. Várias storages usadas em vão por algo que dá para se fazer em 2~3 linhas. Mas ele está funcionando, então irei aprova-lo. Obrigado pela contribuição. Compartilhar este post Link para o post