VI

Sistema De Reset

Por vitimdumau, 02 de jun. de 2010 em Scripts

16
6.5k
vitimdumauV
02 de junho de 2010 às 20:42

Aaai procuro um sistema de reset tipo o de rozin , ex: fala !reset no lvl 10k vira super assassin ii ganha umas magias muitos lols ii mais fortes , de novo !reset lvl 60k vira mega assasino ganha mais magias ii armas novas etc... ALGUEM AI PODE ME AJUDAR PLX?

DevilMoonD
03 de junho de 2010 às 13:12

s o sistema de reset normal eu tenhu um que preste!

 

isso dai eu n sei :S

vitimdumauV
04 de junho de 2010 às 09:27

intaoh me passa ele ai então fasendo favor =) vo ve se consigo..

AAAI VC Q É MAPPEr pode conseguir um mapa bom pra mim to um tempão procurando um mapa..vlw fuiiz

Editado Junho 4 por Vitiiiim

DevilMoonD
04 de junho de 2010 às 12:49

sahusha o mapa fala pelo pvt o script ta ai dps tu edita ok?

 

 

ok vai em DATA>NPC

 

cria uma pasta xml ou copia de outro npc renomeia para Reseter e bota isso dentro

 

 

<?xml version="1.0" encoding="UTF-8"?>

<npc name="Reseter" script="reset.lua" walkinterval="2000" floorchange="0">

<health now="150" max="150"/>

<look type="115" head="115" body="0" legs="114" feet="0" addons="3" corpse="2212"/>

<parameters>

<parameter key="module_shop" value="1"/>

<parameter key="message_greet" value="Eae |PLAYERNAME| Tudu Blz? Fala reset para resetar seu lvl ou diga resets. Cuidado ao resetar seu level voltara ao 30 e sua velocidade tambem!"/>

</parameters>

</npc>

 

Agora vai em Data>Npcs>Scripts

 

cria uma pasta reset.lua e bota isso dentro

 

 

-- config

minlevel = 25000 -- level para resetar

price = 500000 -- dinheiro para pagar ao resetar

newlevel = 30 -- level após reset

newexp = 368300 -- nova experiencia após reset

-- end config

 

function addReset(cid)

resets = getResets(cid)

setPlayerStorageValue(cid,36874,resets+1)

return true

end

 

function getResets(cid)

resets = getPlayerStorageValue(cid,36874)

if resets < 0 then

resets = 0

end

return resets

end

 

 

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, 'reset') then

selfSay('Do you want to reset your character level? Your character will be logged off if you confirm. You must pay '..price..' gold coins to reset.', cid)

talkState[talkUser] = 1

elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then

if getPlayerMoney(cid) < price then

selfSay('You must pay '..price..' gold coins to reset.', cid)

elseif getPlayerLevel(cid) < minlevel then

selfSay('You must be at least level '.. minlevel ..' to reset.', cid)

else

doPlayerRemoveMoney(cid,price)

addReset(cid)

playerid = getPlayerGUID(cid)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level`="..newlevel..",`experience`="..newexp.." WHERE `players`.`id`= ".. playerid .."")

end

talkState[talkUser] = 0

elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser]) == TRUE) then

talkState[talkUser] = 0

selfSay('Ok.', cid)

elseif msgcontains(msg, 'resets') then

selfSay('You have '..getResets(cid)..' reset(s).', cid)

end

 

return true

end

 

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new())

 

Se Gostar da um Rep + ae :D dps tu edita o lvl que ele reseta , qanto ele paga , o level que ele volta dps tals !

vitimdumauV
04 de junho de 2010 às 20:25

Aaai o sistema eu ja achei agora quero tipo um igual do rozin quero abrender como colocar , ex : da reset muda a classe ganha spells novos ii fica mais forte , me ajuda a procurar vlw.. Abraçç aah ii ja te dei ++ pontos me da aii tbm vlw fuiiiz . te ++

DragoRD
06 de junho de 2010 às 17:49

sahusha o mapa fala pelo pvt o script ta ai dps tu edita ok?

 

 

ok vai em DATA>NPC

 

cria uma pasta xml ou copia de outro npc renomeia para Reseter e bota isso dentro

 

 

<?xml version="1.0" encoding="UTF-8"?>

<npc name="Reseter" script="reset.lua" walkinterval="2000" floorchange="0">

<health now="150" max="150"/>

<look type="115" head="115" body="0" legs="114" feet="0" addons="3" corpse="2212"/>

<parameters>

<parameter key="module_shop" value="1"/>

<parameter key="message_greet" value="Eae |PLAYERNAME| Tudu Blz? Fala reset para resetar seu lvl ou diga resets. Cuidado ao resetar seu level voltara ao 30 e sua velocidade tambem!"/>

</parameters>

</npc>

 

Agora vai em Data>Npcs>Scripts

 

cria uma pasta reset.lua e bota isso dentro

 

 

-- config

minlevel = 25000 -- level para resetar

price = 500000 -- dinheiro para pagar ao resetar

newlevel = 30 -- level após reset

newexp = 368300 -- nova experiencia após reset

-- end config

 

function addReset(cid)

resets = getResets(cid)

setPlayerStorageValue(cid,36874,resets+1)

return true

end

 

function getResets(cid)

resets = getPlayerStorageValue(cid,36874)

if resets < 0 then

resets = 0

end

return resets

end

 

 

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, 'reset') then

selfSay('Do you want to reset your character level? Your character will be logged off if you confirm. You must pay '..price..' gold coins to reset.', cid)

talkState[talkUser] = 1

elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then

if getPlayerMoney(cid) < price then

selfSay('You must pay '..price..' gold coins to reset.', cid)

elseif getPlayerLevel(cid) < minlevel then

selfSay('You must be at least level '.. minlevel ..' to reset.', cid)

else

doPlayerRemoveMoney(cid,price)

addReset(cid)

playerid = getPlayerGUID(cid)

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level`="..newlevel..",`experience`="..newexp.." WHERE `players`.`id`= ".. playerid .."")

end

talkState[talkUser] = 0

elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser]) == TRUE) then

talkState[talkUser] = 0

selfSay('Ok.', cid)

elseif msgcontains(msg, 'resets') then

selfSay('You have '..getResets(cid)..' reset(s).', cid)

end

 

return true

end

 

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)

npcHandler:addModule(FocusModule:new())

 

Se Gostar da um Rep + ae :D dps tu edita o lvl que ele reseta , qanto ele paga , o level que ele volta dps tals !

 

Como funciona esse reset?

 

Falamos com o npc e resetamos, mas o que acontece, sem ser voltar ao lvl 30, quais são as vantagens de resetar? :o

VodkartV
06 de junho de 2010 às 17:54

voce fica com o mesmo hp e mana

sendo que anets do reset vc tinha 1000 hp / 1000 mana

 

ai vc reseto fico tudo igual,a vantagem é que ainda ao upar vai poder ficar com mais mana e hp ainda

DragoRD
06 de junho de 2010 às 18:32

voce fica com o mesmo hp e mana

sendo que anets do reset vc tinha 1000 hp / 1000 mana

 

ai vc reseto fico tudo igual,a vantagem é que ainda ao upar vai poder ficar com mais mana e hp ainda

 

Hum, entendi, parece muito útil, especialmente para knights e mages (paladino não usa tanto a mana ou a vida para atacar)^^

Editado Junho 6 por DragoR

vitimdumauV
12 de junho de 2010 às 20:47

aff isso eu seei eu quero que quando resetar .. exemplo: sou druid , falei !reset,aii vira super druid

VodkartV
12 de junho de 2010 às 20:58

tpw então faz assim

 

if getPlayerVocation(cid) == 5  then
doPlayerSetVocation(cid, 9)
end

 

5 = id da voc da druid

9 = id da voc da super druid

Editado Junho 12 por Vodkart

DragoRD
13 de junho de 2010 às 07:11

tpw então faz assim

 

if getPlayerVocation(cid) == 5  then
doPlayerSetVocation(cid, 9)
end

 

5 = id da voc da druid

9 = id da voc da super druid

 

Onde coloca isso no script? No começo?

davialvesD
13 de junho de 2010 às 15:46

tpw então faz assim

 

if getPlayerVocation(cid) == 5  then
doPlayerSetVocation(cid, 9)
end

 

5 = id da voc da druid

9 = id da voc da super druid

 

Onde coloca isso no script? No começo?

 

Você ira colocar no meio Disso :

 

doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))

doRemoveCreature(cid)

 

Então ficara assim :

doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
if getPlayerVocation(cid) == 5  then
doPlayerSetVocation(cid, 9)
doRemoveCreature(cid)

8 meses depois...
david369D
01 de fevereiro de 2011 às 02:27

Eu nao conseguir add npc no meu mapa pf me ajudem (

 

msn : david.s.83@hotmail.com

2 meses depois...
passuP
23 de abril de 2011 às 10:51

?

Editado Abril 23 por passu

9 meses depois...
yoroshigodY
11 de janeiro de 2012 às 21:09

Hm... Parece ser bom eu editei tals' eu tentei fazer direitinho mais o npc nao cria :)