• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Reset

fireelement

New Member
Joined
May 16, 2009
Messages
34
Reaction score
0
Location
Brazil
I use the system reset and resets when someone looks like the look:

13:10 You see David Have a 2 reset's. Have a 3 reset's. Have a 4 reset's. Have a 5 reset's. Have a 6 reset's. Have a 7 reset's. Have a 8 reset's. (Level 220). He is the lord drunou.

Wanted to appear like this:

13:10 You see David (Level 220) [Reset 8]. He is the lord drunou.

____________________________________________________________

My reset system (talkaction):

Code:
-- script by Marcryzius Devil. --
function onSay(cid, words, param)
config = {
RemainingLvl=8, -- level que ficará depois de ser resetado.
exper=4200, -- experiencia que ficará depois de ser resetado.
pid=getPlayerGUID(cid), -- não mecha
skull="yes", -- players com white skull podem resetar? ("yes" or "no").
redskull="yes", -- players com red skull podem resetar? ("yes" or "no").
prot="yes", -- players precisam estar em protection zone pra resetar? ("yes" or "no").
bat="yes" --players precisam estar sem fight pra resetarem? ("yes" or "no").
}
 
function getResets(cid)
reset = getPlayerStorageValue(cid,1020)
if reset < 0 then
reset = 0
end
return reset
end 
if(config.skull == "no") and (getCreatureSkullType(cid) == 3) then
doPlayerSendTextMessage(cid,22,"Apenas players sem white skull podem resetar.")
return TRUE
end
if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then
doPlayerSendTextMessage(cid,22,"Apenas player sem red skull podem resetar.")
return TRUE
end
if(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
doPlayerSendTextMessage(cid,22,"Você precisa estar em protection zone pra poder resetar.")
return TRUE
end
if(config.bat == "no") and (getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE) then
doPlayerSendTextMessage(cid,22,"Você precisa estar sem battle pra poder resetar.")
return TRUE
end
if getPlayerStorageValue(cid,1020) > 5 then
if getPlayerLevel(cid) >= 380 then
setPlayerStorageValue(cid,1020,getResets(cid)+1)
doPlayerSetNameDescription(cid, " Have a "..getResets(cid)+(1).." reset\'s.")
doPlayerPopupFYI(cid,"You now was reset, you have "..getResets(cid)+(1).." reset\'s.")
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)
db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid)
else
doPlayerSendCancel(cid, "Apos o quinto reset é necessario level 380 para resetar.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
elseif getPlayerLevel(cid) >= 350 then
setPlayerStorageValue(cid,1020,getResets(cid)+1)
doPlayerSetNameDescription(cid, " Have a "..getResets(cid)+(1).." reset\'s.")
doPlayerPopupFYI(cid,"You now was reset, you have "..getResets(cid)+(1).." reset\'s.")
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)
db.executeQuery("UPDATE `players` SET `reset` = `reset` + 1 WHERE `id` = "..config.pid)
else
doPlayerSendCancel(cid, "You need to have level 350 or more you may be reset.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
return TRUE
end

Storage ID: 1020

Sorry for my english, I used a translator.
 
Last edited:

Similar threads

Back
Top