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

Xikini's Free Scripting Service. [0.3.7 & (0.3.6/0.4)]

Status
Not open for further replies.

Xikini

I whore myself out for likes
Senator
Joined
Nov 17, 2010
Messages
6,812
Solutions
582
Reaction score
5,372
Doing quick (30 min or less) scripts for [0.3.7 & (0.3.6/0.4)]
I am not here to fix your broken scripts, although I will give advice if requested.
I am here for script requests of scripts not already available on the forum.
If you require support for your scripting issues please make a thread in the support section.

For clarity's sake,
I will script actionscripts, creaturescripts, globalevents, talkactions, movements, npcs for you.
I will not script spells, weapons, raids or monster scripts.
Additionally, source editing, websites and database queries are a no go as well.

Code:
How to make shorter links to posts.
https://otland.net/threads/234306/page-14#post-2330703
 
Last edited:
Hello bro i wanted script for loosing item when i pass way. I have tfs 0.3.6 v8.2 when i import your script i got this error
[Error - MoveEvents Interface]
[17/08/2015 00:49:13] data/movements/scripts/boss2.lua:eek:nStepIn
[17/08/2015 00:49:13] Description:
[17/08/2015 00:49:13] data/movements/scripts/boss2.lua:7: attempt to compare nil with number
[17/08/2015 00:49:13] stack traceback:
[17/08/2015 00:49:13] data/movements/scripts/boss2.lua:7: in function <data/movements/scripts/boss2.lua:6>
Sorry my bad. I forgot to link how many required to the config.
Code:
if getPlayerItemCount(cid, config.item_required) >= how_many_required then
if getPlayerItemCount(cid, config.item_required) >= config.how_many_required then
Code:
local config = {
   how_many_required = 1, -- how many of the item_required, required, to pass.
   item_required = 1111111, -- itemID of the item required.
   remove_item = 1 -- remove item = 1 | 0 = do not remove item.
}
function onStepIn(cid, item, position, fromPosition)
   if getPlayerItemCount(cid, config.item_required) >= config.how_many_required then
     if config.remove_item == 1 then
       doPlayerRemoveItem(cid, config.item_required, config.how_many_required)
       doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "".. config.how_many_required .." ".. getItemNameById(config.item_required) .."(s) removed from inventory. Journey onwards ".. getCreatureName(cid) ..".")
     else
       doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have the correct item(s) to pass. Journey onwards ".. getCreatureName(cid) ..".")
     end
   else 
     doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You require ".. config.how_many_required .." ".. getItemNameById(config.item_required) .."(s) to pass through here!")
     doTeleportThing(cid, fromPosition)
   end
   return TRUE
end
 
Now i understand, THANKS!

I dont know if u check my old post ( https://otland.net/threads/how-can-i-add-50-to-this-script.235290/#post-2272435 ), but i am having a problem.
Now i understand (since u teached me lol) how to add 50% exp when premium player log in + keep 50% exp when player advance level. Thats nice.

But if you check the post (go down on post to find what i am saying), i have a exp ring script. This script add 10% more exp for player wearing it. (sorry for english, im brazilian). The problem is: player are premium (+50% exp) and use the ring (+ 10% exp).

If u check the post i tried to make storages to check if player are using the ring.
So i putted this way on CREATURESCRIPT (ring script):

If Player equip the exp ring + are free account -> get 10% more exp.
If player equip the exp ring + are premium account -> get 60% more exp (50% for being premium + 10% from exp ring) + player get storage X

If player dequip exp ring + are free account -> exp back to normal
If player dequip exp ring + are premium account -> set experience 50% (for being premium account) + remove storage X

Adding the storage are used to know if player were using the exp ring when log out.

If he were using the exp ring when he log out (then he have X storage), the FUNCTION ONLOGIN will:
If player have storage X and are premium then: Add 60% experience (50% experience for benig premium + 10% experience for using the ring);
If player have storage X and are not premium then: Add 10% experience for using exp ring.
If player do not have storage X and are premium then: Add 50% exp experience for being premium account
If player do not have storage X and are not premium account then: do not add any experience.

What u think about this logic? Ideas for the code? (u can check the codes that do not work with me in other post).
I am really breaking my head in this script xD
Replied in support thread.
 
If your using stages.xml.. you should set the experience to 1.0 in config.lua..
Anything other then 1.0 and your going to screw up your stages.xml

So all in all set-up your stages.xml perfectly..
so level 1-99 get's 3x experience
level 100-199 get's 2x experience
level 200+ get's 1x experience -- this is all normal experience rates.

IF you downloaded a server, and want all experience from monsters to be 2x normal rates.. then change to 2.0
OR
change stages.xml to
6x
4x
2x

and yes change script to reflect your config.lua
So if config.lua = 1.0
then SKILL__LEVEL, 1)

if config.lua = 2.0
then SKILL__LEVEL, 2)
and rate = 3
(this is some math here.. if 1.0 then 1.5.. if 2.0 then 3.. if 15.0 then 22.5)

Buddy please help me.
Stage for the level > 50 < 100 = 5
Player are level 70.
Monster give 2k exp.

This code: doPlayerSetRate(cid, SKILL__LEVEL, 1.5) are making player receive 22.5k. Why?
EDIT: 10k = normal monster experience because 2k (monster xp) * 5 (stage rate) = 10k.
 
Hello! Do you script for tibia servers 8.60 do you know how to raise the max level after each prestige? or know how to make the exp rate lower for each prestige? you can help me with either I just need one thank you!
 
Hello! Do you script for tibia servers 8.60 do you know how to raise the max level after each prestige? or know how to make the exp rate lower for each prestige? you can help me with either I just need one thank you!
Using the prestige storage value, you'd want to register it in login and on onAdvance, like we've been doing on page 4, but instead of checking for premium, check for the storage value, and decrease the amount. Unfortunately I'm not going to be able to help further then that.
Code:
doPlayerSetRate(cid, SKILL__LEVEL, config.rate - getPlayerStorageValue(cid,45001))
This is will take the config.rate and - by the current storage value of the player.
So if your config.rate is 600 and your current prestige is 43 (43 rebirths?) the new config.rate would be 600-43=557.
You could change it like this to take away more experience

Code:
doPlayerSetRate(cid, SKILL__LEVEL, config.rate - (getPlayerStorageValue(cid,45001)*8))
So same scenario your config.rate is 600 and your current prestige is 43 (43 rebirths?)*8 .. the new config.rate would be 600-(43*8)=256.
Anyways, good luck there.

Buddy please help me.
Stage for the level > 50 < 100 = 5
Player are level 70.
Monster give 2k exp.

This code: doPlayerSetRate(cid, SKILL__LEVEL, 1.5) are making player receive 22.5k. Why?
EDIT: 10k = normal monster experience because 2k (monster xp) * 5 (stage rate) = 10k.
2k monster experience.
5 is multiplier in stages.
1.5 in config.lua, (because of login/advance script)
1.5 if your premium, for 2 hours. (Stamina)

2k * 5 = 10k
10k * 1.5 = 15k
15k * 1.5 = 22.5k
 
Using the prestige storage value, you'd want to register it in login and on onAdvance, like we've been doing on page 4, but instead of checking for premium, check for the storage value, and decrease the amount. Unfortunately I'm not going to be able to help further then that.
Code:
doPlayerSetRate(cid, SKILL__LEVEL, config.rate - getPlayerStorageValue(cid,45001))
This is will take the config.rate and - by the current storage value of the player.
So if your config.rate is 600 and your current prestige is 43 (43 rebirths?) the new config.rate would be 600-43=557.
You could change it like this to take away more experience

Code:
doPlayerSetRate(cid, SKILL__LEVEL, config.rate - (getPlayerStorageValue(cid,45001)*8))
So same scenario your config.rate is 600 and your current prestige is 43 (43 rebirths?)*8 .. the new config.rate would be 600-(43*8)=256.
Anyways, good luck there.


2k monster experience.
5 is multiplier in stages.
1.5 in config.lua, (because of login/advance script)
1.5 if your premium, for 2 hours. (Stamina)

2k * 5 = 10k
10k * 1.5 = 15k
15k * 1.5 = 22.5k

WTF u completely right!!!!! it was adding + 1,5 for that stamina stufffff, thank yaa.. now let me back working with that damw hard codeee!!
 
@Xikini Script on item which working like this:

Use item on special monster and got 10% chance that this monster will be your summon if it success you will be able to summon him everytime you want by command !summon. If it fail item is destroyed and you don't get summon.
I will be very greatful. :)
TFS 0.3.6.
 
@Xikini Script on item which working like this:

Use item on special monster and got 10% chance that this monster will be your summon if it success you will be able to summon him everytime you want by command !summon. If it fail item is destroyed and you don't get summon.
I will be very greatful. :)
TFS 0.3.6.
To save myself some time I'm going to tell you how to make it yourself.
Find a war_bear_mount script.
Remove part where you get the mount.
Add in convince creature.
Give storageID.

Make talkactions script to summon a monster.
Make it check for storageID.

Done.


kill a monster (filename= KillisSummon) ingame name like a normal monster.

when i kill that monster it summons a boss called Kaliks

TFS 0.3.7
https://otland.net/threads/xikinis-free-scripting-service-0-3-7-0-3-6-0-4.234306/page-3#post-2265066
Remove the storagevalue given.
Make it a summon a monster instead.

Code:
doCreateMonster(name, pos)

If you guys need more help, just post again or pm me.
It's my anniversary today.
:oops:
 
Last edited:
This script requested by cmarofpicka checks your vocation, then converts an item or stack of items into another item, or stack of items.
It's originally intended to be used with the vocational statues, but you can use some imagination I'm sure.

Generally it works like this.

Use Statue.
Check vocation.
If correct vocation, check if player has correct item in their backpack
If yes, remove that item, and add another item.
(can be repeated infinitely)

(For example: If you have a green mushroom and are a druid, using the druid statue, give a mana potion, and remove green mushroom.)

Anyways! The scripts.
To install, simply add the ActionID to the statues/objects you want the script to use.


data/actions/actions.xml
Code:
<action actionid="45001" event="script" value="vocation_statues_item_conversion.lua"/>
data/actions/scripts/vocation_statues_item_conversion.lua
Code:
-- Updated code. Credits to Codex NG for helping me in Support. ^.^
local config = {
   [1] = { itemRequired = 1111, itemRequiredAmount = 1, itemGiven = 1111, itemGivenAmount = 1, statueID = 8834, nopromo = "sorcerer", promo = "master sorcerer"},
   [2] = { itemRequired = 1111, itemRequiredAmount = 1, itemGiven = 1111, itemGivenAmount = 1, statueID = 8422, nopromo = "druid", promo = "elder druid"},
   [3] = { itemRequired = 1111, itemRequiredAmount = 1, itemGiven = 1111, itemGivenAmount = 1, statueID = 8836, nopromo = "paladin", promo = "royal paladin"},
   [4] = { itemRequired = 1111, itemRequiredAmount = 1, itemGiven = 1111, itemGivenAmount = 1, statueID = 3739, nopromo = "knight", promo = "elite knight"}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
   local vocType = getPlayerVocationName(cid):lower()
   for vocation, data in ipairs(config) do
     if item.itemid == config[vocation].statueID then
       if (vocType == config[vocation].nopromo or vocType == config[vocation].promo) then
         if getPlayerItemCount(cid, config[vocation].itemRequired) >= config[vocation].itemRequiredAmount then
           doPlayerRemoveItem(cid, config[vocation].itemRequired, config[vocation].itemRequiredAmount)
           doPlayerAddItem(cid, config[vocation].itemGiven, config[vocation].itemGivenAmount, true)
           doCreatureSay(cid, "Removed ".. config[vocation].itemRequiredAmount .." ".. getItemNameById(config[vocation].itemRequired) ..". You received ".. config[vocation].itemGivenAmount .." ".. getItemNameById(config[vocation].itemGiven) ..".", TALKTYPE_ORANGE_1)
           return true
         else
           return doPlayerSendCancel(cid, "You require ".. config[vocation].itemRequiredAmount .." ".. getItemNameById(config[vocation].itemRequired) .." to receive ".. config[vocation].itemGivenAmount .." ".. getItemNameById(config[vocation].itemGiven) ..".")
         end
       else
         return doPlayerSendCancel(cid, "Only "..(config[vocation].nopromo).."s may use this statue.")
       end
     end
   end
   return doPlayerSendCancel(cid, "ERROR: ItemID used is incorrect. Contact Administration that script is not functioning as intended.")
   -- If you receive this error then the ItemID is incorrect. Check the statues being used.
   return true
end
Code:
local config = {
   sorcerer =   { itemRequired = 1111, itemRequiredAmount = 1, itemGiven = 1111, itemGivenAmount = 1, statueID = 8834},
   druid =      { itemRequired = 1111, itemRequiredAmount = 1, itemGiven = 1111, itemGivenAmount = 1, statueID = 8422},
   knight =     { itemRequired = 1111, itemRequiredAmount = 1, itemGiven = 1111, itemGivenAmount = 1, statueID = 8836},
   paladin =    { itemRequired = 1111, itemRequiredAmount = 1, itemGiven = 1111, itemGivenAmount = 1, statueID = 3739}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
   -- Sorcerers
   if item.itemid == config.sorcerer.statueID then
     if getPlayerVocationName(cid):lower() == "sorcerer" or getPlayerVocationName(cid):lower() == "master sorcerer" then
       if getPlayerItemCount(cid, config.sorcerer.itemRequired) >= config.sorcerer.itemRequiredAmount then
         doPlayerRemoveItem(cid, config.sorcerer.itemRequired, config.sorcerer.itemRequiredAmount)
         doPlayerAddItem(cid, config.sorcerer.itemGiven, config.sorcerer.itemGivenAmount, true)
         doCreatureSay(cid, "Removed ".. config.sorcerer.itemRequiredAmount .." ".. getItemNameById(config.sorcerer.itemRequired) ..". You received ".. config.sorcerer.itemGivenAmount .." ".. getItemNameById(config.sorcerer.itemGiven) ..".", TALKTYPE_ORANGE_1)
       else
         return doPlayerSendCancel(cid, "You require ".. config.sorcerer.itemRequiredAmount .." ".. getItemNameById(config.sorcerer.itemRequired) .." to receive ".. config.sorcerer.itemGivenAmount .." ".. getItemNameById(config.sorcerer.itemGiven) ..".")
       end
     else
       return doPlayerSendCancel(cid, "Only sorcerers may use this statue.")
     end
   -- Druids
   elseif item.itemid == config.druid.statueID then
     if getPlayerVocationName(cid):lower() == "druid" or getPlayerVocationName(cid):lower() == "elder druid" then
       if getPlayerItemCount(cid, config.druid.itemRequired) >= config.druid.itemRequiredAmount then
         doPlayerRemoveItem(cid, config.druid.itemRequired, config.druid.itemRequiredAmount)
         doPlayerAddItem(cid, config.druid.itemGiven, config.druid.itemGivenAmount, true)
         doCreatureSay(cid, "Removed ".. config.druid.itemRequiredAmount .." ".. getItemNameById(config.druid.itemRequired) ..". You received ".. config.druid.itemGivenAmount .." ".. getItemNameById(config.druid.itemGiven) ..".", TALKTYPE_ORANGE_1)
       else
         return doPlayerSendCancel(cid, "You require ".. config.druid.itemRequiredAmount .." ".. getItemNameById(config.druid.itemRequired) .." to receive ".. config.druid.itemGivenAmount .." ".. getItemNameById(config.druid.itemGiven) ..".")
       end
     else
       return doPlayerSendCancel(cid, "Only druids may use this statue.")
     end
   -- Knights
   elseif item.itemid == config.knight.statueID then
     if getPlayerVocationName(cid):lower() == "knight" or getPlayerVocationName(cid):lower() == "elite knight" then
       if getPlayerItemCount(cid, config.knight.itemRequired) >= config.knight.itemRequiredAmount then
         doPlayerRemoveItem(cid, config.knight.itemRequired, config.knight.itemRequiredAmount)
         doPlayerAddItem(cid, config.knight.itemGiven, config.knight.itemGivenAmount, true)
         doCreatureSay(cid, "Removed ".. config.knight.itemRequiredAmount .." ".. getItemNameById(config.knight.itemRequired) ..". You received ".. config.knight.itemGivenAmount .." ".. getItemNameById(config.knight.itemGiven) ..".", TALKTYPE_ORANGE_1)
       else
         return doPlayerSendCancel(cid, "You require ".. config.knight.itemRequiredAmount .." ".. getItemNameById(config.knight.itemRequired) .." to receive ".. config.knight.itemGivenAmount .." ".. getItemNameById(config.knight.itemGiven) ..".")
       end
     else
       return doPlayerSendCancel(cid, "Only knights may use this statue.")
     end
   -- Paladins
   elseif item.itemid == config.paladin.statueID then
     if getPlayerVocationName(cid):lower() == "paladin" or getPlayerVocationName(cid):lower() == "royal paladin" then
       if getPlayerItemCount(cid, config.paladin.itemRequired) >= config.paladin.itemRequiredAmount then
         doPlayerRemoveItem(cid, config.paladin.itemRequired, config.paladin.itemRequiredAmount)
         doPlayerAddItem(cid, config.paladin.itemGiven, config.paladin.itemGivenAmount, true)
         doCreatureSay(cid, "Removed ".. config.paladin.itemRequiredAmount .." ".. getItemNameById(config.paladin.itemRequired) ..". You received ".. config.paladin.itemGivenAmount .." ".. getItemNameById(config.paladin.itemGiven) ..".", TALKTYPE_ORANGE_1)
       else
         return doPlayerSendCancel(cid, "You require ".. config.paladin.itemRequiredAmount .." ".. getItemNameById(config.paladin.itemRequired) .." to receive ".. config.paladin.itemGivenAmount .." ".. getItemNameById(config.paladin.itemGiven) ..".")
       end
     else
       return doPlayerSendCancel(cid, "Only paladins may use this statue.")
     end
   else
     return doPlayerSendCancel(cid, "ERROR: itemID used is incorrect. Contact Administration that script is not functioning as intended.")
     -- If you receive this error then the itemID is incorrect. Check the statues being used.
   end
   return true
end
 
Last edited:
[TFS 1.1 Request]
I understand 1.1 isn't one of your listed versions, but I figured I'd at least try to request it..


Could you please script an automated task system?

In this one script we'd be able to dictate the name of the monster and the amount needed to be killed. Once a task is completed, you automatically get "x" amount of experience, with the ability to modify the reward of each task to grant task-specific rewards such as Slingshot, 5cc, etc. This is an automated system that would trigger once a character has been created. It'd also be awesome if we could dictate if a specific task is repeatable (as well as a storage ID for each task so they could be linked to the quest log or many other systems).

This request does not include a NPC whatsoever, and the player will have basically started out with all tasks auto-accepted.
 
[TFS 1.1 Request]
I understand 1.1 isn't one of your listed versions, but I figured I'd at least try to request it..


Could you please script an automated task system?

In this one script we'd be able to dictate the name of the monster and the amount needed to be killed. Once a task is completed, you automatically get "x" amount of experience, with the ability to modify the reward of each task to grant task-specific rewards such as Slingshot, 5cc, etc. This is an automated system that would trigger once a character has been created. It'd also be awesome if we could dictate if a specific task is repeatable (as well as a storage ID for each task so they could be linked to the quest log or many other systems).

This request does not include a NPC whatsoever, and the player will have basically started out with all tasks auto-accepted.
I'll take this to private.
 
Status
Not open for further replies.
Back
Top