SU

{Quest Star Items} Heroserv~Loucoserv

Por Subwat, 27 de ago. de 2011 em Actions e Talkactions

script
7
2k
SubwatS
27 de agosto de 2011 às 14:34

esse é o sistema que a equipe do heroserv usa para dar itens stars,no Hero ao atingir level 200 você é teleportado automaticamente há uma sala com as chests,ao dar use numa das chests você recebe o item e é teleportado para o templo.

simples e útil.

 

CREATURESCRIPTS/SCRIPTS/200.LUA

 

function onAdvance(cid, skill, oldLevel, newLevel)
if skill == SKILL__LEVEL then
if newLevel >= 200 and oldLevel < 200 then
pos = {x=10475, y=10807, z=7}
doTeleportThing(cid,pos)
pos = {x=10475, y=10807, z=7}
doPlayerSendTextMessage(cid, 22, "parabéns você atingiu o level 200 você pode escolher um star item!")
end
end
end

 

TAG:

	<event type="advance" name="staritem" script="200.lua"/>

em creaturescripts/scripts/login.lua

cole está tag tmbm

 

if getPlayerLevel(cid) < 200 then 
registerCreatureEvent(cid, "staritem") 
end

 

 

ACTIONS:

function onUse(cid, item, frompos, item2, topos)
if item.uid == 2433 then
queststatus = getPlayerStorageValue(cid,7407)
if queststatus == -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "you received your star item!.") 
doPlayerAddItem(cid,2433,1)
pos = {x=10160, y=10054, z=7}
doTeleportThing(cid,pos)
pos = {x=10160, y=10054, z=7}
setPlayerStorageValue(cid,7407,1)
else
doPlayerSendTextMessage(cid,22,"Você ja ganhou este bonus!")
end
else
return 0
end
return 1
end 

function onUse(cid, item, frompos, item2, topos)
if item.uid == 7388 then
queststatus = getPlayerStorageValue(cid,7407)
if queststatus == -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "you received your star item!.") 
doPlayerAddItem(cid,7388,1)
pos = {x=10160, y=10054, z=7}
doTeleportThing(cid,pos)
pos = {x=10160, y=10054, z=7}
setPlayerStorageValue(cid,7407,1)
else
doPlayerSendTextMessage(cid,22,"Você ja ganhou este bonus!")
end
else
return 0
end
return 1
end 

function onUse(cid, item, frompos, item2, topos)
if item.uid == 7407 then
queststatus = getPlayerStorageValue(cid,7407)
if queststatus == -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "you received your star item!.") 
doPlayerAddItem(cid,7407,1)
pos = {x=10160, y=10054, z=7}
doTeleportThing(cid,pos)
pos = {x=10160, y=10054, z=7}
setPlayerStorageValue(cid,7407,1)
else
doPlayerSendTextMessage(cid,22,"Você ja ganhou este bonus!")
end
else
return 0
end
return 1
end 

function onUse(cid, item, frompos, item2, topos)
if item.uid == 7415 then
queststatus = getPlayerStorageValue(cid,7407)
if queststatus == -1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "you received your star item!.") 
doPlayerAddItem(cid,7415,1)
pos = {x=10160, y=10054, z=7}
doTeleportThing(cid,pos)
pos = {x=10160, y=10054, z=7}
setPlayerStorageValue(cid,7407,1)
else
doPlayerSendTextMessage(cid,22,"Você ja ganhou este bonus!")
end
else
return 0
end
return 1
end 

 

TAGS:

  <action uniqueid="2433" event="script" value="2433.lua"/>
       <action uniqueid="7415" event="script" value="7415.lua"/>
       <action uniqueid="7407" event="script" value="7407.lua"/>
       <action uniqueid="7388" event="script" value="7388.lua"/>

 

 

No map editor crie a area com as chests com as respectivas Unique IDS,mude as POSITIONS q vai ser teleportado NOs scripts.

Editado Agosto 27 por Subwat

LukaszGL
27 de agosto de 2011 às 14:41

First Muito bom tava atraiz desse script.

 

VLW

devotti2D
29 de agosto de 2011 às 13:39

Perfect. rep +

SubwatS
29 de agosto de 2011 às 17:27

hehe vlw brow.

brigado pela consideração

SkyDangerousS
29 de agosto de 2011 às 17:39

uhuh'

Criativo , ja vo por no meu servidor ;D

 

REP + ;d

SubwatS
29 de agosto de 2011 às 18:00

VLW ae sangbão,foi facil de fazer esse script :p

1 mês depois...
LuansousaL
28 de setembro de 2011 às 15:24

Script boa só agr q eu consegui acha :thumbsupsmiley2:

Rep :button_ok: Vlw's Geanpost-329486-0-48748800-1317234248_thumb.gif