Jump to content
Sign in to follow this  
notle.com

troca troca ui q loucura (rune)

Recommended Posts

notle.com    2
notle.com

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

Edited by notle.com

Share this post


Link to post
iuniX    4
iuniX

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.

Share this post


Link to post
Sign in to follow this  
  • Recently Browsing   0 members

    No registered users viewing this page.

×