• 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!

I need help with some scripts

philippelo

New Member
Joined
Mar 2, 2014
Messages
7
Reaction score
0
Good afternoon guys!
I need help with some scripts
Monsters Monsters System x

I need help on a system of monster vs monster as well .. more
would be the following'm developing a style league of legends server where towers created as monsters and ... tals and tanbem are monsters and minions wanted this, that these minions to attack these towers tanbem are monsters.



Moreover this system have npc that resets the level beyond most players want the npc resetasse the skills
Code:
Local config = {
MinLevel = 250 --- inical level to reset
price = 0, --- starting price for reset
newlevel = 100, level after resetting ---
priceByReset = 0, --- added price for reset
percent = 1 ---- percent of life / mana you have to reset (in relation to its former total life)
levelbyreset --- = 0 as the level will need more next reset
}
--- End config



addReset function (uid)
getResets resets = (uid)
setPlayerStorageValue (uid, 378378, resets + 1)
doTeleportThing (uid, getTownTemplePosition (getPlayerTown (uid)))
Local getCreatureMaxHealth hp = (uid)
Local resethp = hp * (config.percent / 100)
setCreatureMaxHealth (uid, resethp)
Local differencehp = (hp - resethp)
doCreatureAddHealth (uid, -differencehp)
Local mana = getCreatureMaxMana (uid)
Local resetmana mana = * (config.percent / 100)
setCreatureMaxMana (uid, resetmana)
Local differencemana = (mana - resetmana)
doCreatureAddMana (uid, -differencemana)
         doRemoveCreature (uid)
Local description = resets + 1
         db.executeQuery ("UPDATE` `description` players` SET = '[Reset:" ..description .. "]' WHERE` players`.`id` = "playerid .. .." ")
db.executeQuery ("UPDATE` `level` players` SET =" config.newlevel .. .. "` experience` = 0 WHERE `players`.`id` =" playerid .. .. "")
         return true
end

getResets function (uid)
getPlayerStorageValue resets = (uid, 378378)
   resets if <0 then
             resets = 0
           end
return resets
end

Local keywordHandler = KeywordHandler: new ()
Local npcHandler = NpcHandler: new (keywordHandler)
NpcSystem.parseParameters (npcHandler)
Local talkState = {}


onCreatureAppear function (cid) npcHandler: onCreatureAppear (cid) end
function onCreatureDisappear (cid) npcHandler: onCreatureDisappear (cid) end
onCreatureSay function (cid, type, msg) npcHandler: onCreatureSay (cid, type, msg) end

creatureSayCallback function (cid, type, msg)
if (not npcHandler: isFocused (cid)) then
return false
end
Local talkUser = == NPCHANDLER_CONVbehavior CONVERSATION_DEFAULT and 0 or cid


Local newPrice config.price = + (getResets (cid) * config.priceByReset)
Local newminlevel config.minlevel = + (getResets (cid) * config.levelbyreset)

msgcontains if (msg, 'reset') then
getResets if (cid) == Then resets
selfSay ('Do you want to quit?} {yes!', cid)
talkState [talkUser] = 1
else
selfSay ('I couldnt acess of your bank acc!', cid)
end
elseif (msgcontains (msg, 'yes') and talkState [talkUser] == 1) then
getPlayerMoney if (cid) <newPrice Then
selfSay ('Its Necessary to have at least' ..newPrice .. 'gp \' s for reseting! ', cid)
elseif getPlayerLevel (cid) <newminlevel Then
selfSay ('The minimum level for reset and' ..newminlevel .. '!', cid)
else
doPlayerRemoveMoney (cid, newPrice)
playerid = getPlayerGUID (cid)
addEvent (addReset, (5 * 1000), cid)
Local number = getResets (cid) +1
Local msg = "--- [Matches played:" ..number .. "] - You have been reset You will be disconnected in 5 seconds."
doPlayerPopupFYI (cid, msg)
talkState [talkUser] = 0
end
talkState [talkUser] = 0
elseif (msgcontains (msg, 'no')) and isInArray ({1}, talkState [talkUser]) == True Then
talkState [talkUser] = 0
selfSay ('Ok.', cid)
msgcontains elseif (msg, 'quantity') then
selfSay ('You have a total of' ..getResets (cid) .. 'reset (s).', cid)
talkState [talkUser] = 0
end

return true
end

npcHandler: setCallback (CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler: addmodule (FocusModule: new ())




I am also looking for a system of kills a player and earns x item only because all scripts I found on the forum always a problem a function for an item I created for when the player uses this item as the player logs out
I once saw a system where the player took xe level when he spoke / mount he opened a small window (old tibia client) where players could choose between three mounts any know any script that?

And finally a system to not take the place of item (slot) somehow
 
Last edited by a moderator:

Similar threads

Back
Top