
elton123
Membro
-
Registro em
-
Última visita
Solutions
-
elton123's post in (Resolvido)[PEDIDO] Backpack que acrescenta CAP was marked as the answerdeve ser tag
tenta assim
<movevent type="Equip" itemid="1;2;3;4;5;6;7" slot="backpack" event="script" value="cap123.lua"/> <movevent type="DeEquip" itemid="1;2;3;4;5;6;7" slot="backpack" event="script" value="cap123.lua"/> coloca id de uma back dps ; dps outro id sucessivamente
-
elton123's post in (Resolvido)[Pedido] NPC Troca de Sexo. was marked as the answeracabei de fazer um aqui pq nem tinha
arquivo.xml
<npc name="sex" script="data/npc/scripts/sex.lua" floorchange="0" access="5" level="1" maglevel="1"> <health now="150" max="150"/> <look type="128" head="0" body="87" legs="39" feet="0"/> <parameters> <parameter key="module_travel" value="1"/> <parameter key="message_greet" value="Olá |PLAYERNAME|. quer troca de sexo virar um traveco diga {sex change} ?" /> </parameters> </npc> sex.lua
local item_id = {2160,1} -- edita aqui local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) local msg = msg:lower(); local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, "sex change") then if doPlayerRemoveItem(cid,item_id[1],item_id[2]) then doPlayerSetSex(cid,getPlayerSex(cid) == 1 and 0 or 1) doPlayerSendTextMessage(cid,22,"pronto troquei o seu sexo") doSendMagicEffect(getCreaturePosition(cid),28) else selfSay("você não tem dinheiro", cid) talkState[talkUser] = 0 end return true end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) -
elton123's post in (Resolvido)Compilador 3884 - 0.4 - 8.60 was marked as the answereu uso esse
http://www.mediafire.com/download/os3063htddwxlb9/dev-cpp.rar
-
elton123's post in (Resolvido)Pedido+Duvidas was marked as the answertrocar mapa só em
data\world
colar la tem que ser da mesma versão
dps vai em config.lua
procure por
mapName
deixa assim
mapName = "nomedoseumapanovo.otbm"
agora adicionar vocation chatinho tem que ir
em
data\XML\vocations.xml
adiciona aqui suas novas vocations
e tem que editar
spells.xml
movements.xml
colocando sua nova id da vocation em todas spells que você quer q a nova vocation use
colocar sua nova id da vocation em todas movements que você quer q a nova vocation use tal arma
dica
spells.xml
movements.xml
só você seguir padrão dos outros id
-
elton123's post in (Resolvido)Teleportar o player 2 sqm pra direita? was marked as the answer+ou- assim?
function onStepIn(cid, item, pos, fromPos) local a = getCreaturePosition(cid) doTeleportThing(cid,{x=a.x+2,y=a.y,z=a.z}) return true end ou assim
function onStepIn(cid, item, pos, fromPos) doTeleportThing(cid, fromPos, true) return true end explique melhor se não for nenhum dos dois
-
elton123's post in (Resolvido)[PEDIDO] Paralyze ao passar no SQM... was marked as the answercara eu acho que esse vai funciona ai
-- config elton123 local velocidade = 0.9 local life = 0.5 local periodo = 15 -- tempo em segundos -- config elton123 local condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, periodo*1000) setConditionFormula(condition, -velocidade, 0, -velocidade, 0) function onStepIn(cid, item, pos, fromPos) if isPlayer (cid) then doAddCondition(cid,condition) doCreatureAddHealth(cid,-(getCreatureHealth(cid)*life)) end return true end -
elton123's post in (Resolvido)Npc do Destino was marked as the answereu tinha imaginado que as salas seria fechadas sem poder desloga dps eles seria tele...
seria assim
-- config elton123 local npc_destino = { msg = "vc quer que eu escolha o seu destino", -- frase do npc tempo = 10, --em segundos destino_final = {x=160, y=54, z=8}, area = { x = {152,164}, -- posição x as duas pontas horizontal a direita e a esquerda y = {47,54}, -- posição y as duas pontas vertical de cima e de baixo z = {7}, }, salas = { {{x=160, y=54, z=7},sala_msg ="espere eu vou teletransportar você para sala 1"}, {{x=160, y=55, z=7},sala_msg ="espere eu vou teletransportar você para sala 2"}, }, } -- config elton123 local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid if msgcontains(msg, 'destino') then selfSay(npc_destino.msg, cid) talkState[talkUser] = 1 elseif (msgcontains(msg,'no') and talkState[talkUser] == 1) then selfSay("bye", cid) talkState[talkUser] = 0 elseif (msgcontains(msg,'yes') and talkState[talkUser] == 1) then local do_destino = math.random(1,#npc_destino.salas) selfSay(npc_destino.salas[do_destino].sala_msg, cid) doCreatureSetNoMove(cid,true) addEvent(doTeleportThing,5000,cid,npc_destino.salas[do_destino][1]) addEvent(doCreatureSetNoMove,4999,cid,false) addEvent(destinoFinal,npc_destino.tempo*1000,cid,npc_destino.destino_final) talkState[talkUser] = 0 end end function destinoFinal (cid,fim) for xx = npc_destino.area.x[1] , npc_destino.area.x[2] do for yy = npc_destino.area.y[1] , npc_destino.area.y[2] do local floor1 = getTopCreature({x=xx,y=yy,z=npc_destino.area.z[1]}).uid if floor1 > 0 and isPlayer(floor1) then doTeleportThing(cid,fim) end end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) só editar essa parte
area = {
x = {152,164}, -- posição x as duas pontas horizontal a direita e a esquerda
y = {47,54}, -- posição y as duas pontas vertical de cima e de baixo
z = {7},
},
-
elton123's post in (Resolvido)[PEDIDO] Machete cortando vários itens was marked as the answertestei aqui add event com doTransformItem tava quando uns problemas mesmo mais aqui dou um jeito "usando outras functions"
acho que era assim que você queria
local config = { tempo = 5, -- em segundos [2782] = {2781,2782}, [3985] = {2781,3985}, [2767] = {6216,2767}, } function onUse(cid, item, fromPosition, itemEx, toPosition) local items = config[itemEx.itemid] if items then doRemoveItem(itemEx.uid) doCreateItem(items[1],toPosition) addEvent(trasformando,config.tempo*1000,toPosition,items,itemEx) end return true end function trasformando (toPosition,items,itemEx) doRemoveItem(getTileItemById(toPosition,items[1]).uid,1) doCreateItem(items[2],toPosition) return true end