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

Sirion_Mido Free Scripting Service (Actions/Movements/Talkactions/Creaturescripts)

Sirion_Mido

Experienced Member
Joined
Jul 22, 2012
Messages
579
Reaction score
43
Location
E-G-Y-P-T
Hello,

I decide to make scripts depending on players request like cyko , just i do that because cyko closed his theard , so i can continue if anyone want.

Follow these rules and we are good to go!

Rule number 1: No Spamming!
Rule number 2: Be Patient!
Rule number 3: There is no rule number 3!
Rule number 4: Follow all these rules!

As far you can see i accept only Actions/Movements/Talkactions/Creaturescripts.

Rep++ If It Helpful For You..
 
Last edited:
Try this for tp 1.
Lua:
function onStepIn(cid, item, position, fromPosition)
    local level = getPlayerLevel(cid)
    local health = getCreatureMaxHealth(cid)
    local mana = getCreatureMaxMana(cid)
    local experience = getPlayerExperience(cid)
    local hss = 5051 --"The storage that will save the player health"
    local mss = 5052 --"The storage that will save the player mana"
    local ess = 5053 --"The storage that will save the player experience"
    local newpos = {x = 0 y = 0, z = 0} --"The new player position"
    if isPlayer(cid) then
       setPlayerStorageValue(cid, hss, health)
       setPlayerStorageValue(cid, mss, mana)
       setPlayerStorageValue(cid, ess, experience)
       doPlayerAddExperience(cid, -getPlayerExperience(cid)+4200)
       setCreatureMaxHealth(cid, 185)
       setCreatureMaxMana(cid, 35)
       doCreatureAddMana(cid, -getCreatureMana(cid)+35)
       doCreatureAddHealth(cid, -getCreatureHealth(cid)+185)
       doTeleportThing(cid, newpos)
       doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You have been downgraded to level 8.")
       end
    return true
    end
 
the same thing happend. But if i kill a monster after i've went trough the first tp and then walk into the second tp i still have that level.
 
ok sorry , try this
here we are:
in your data/actions/scripts
make file name donaterune.lua
and post the following:
Lua:
function onUse(cid, item, frompos, item2, topos)
	local vocations = {1,2,3,4,5,6,7,8}    
  
	mini = (getPlayerLevel(cid) * 2.5 + getPlayerMagLevel(cid) * 3) * 4.6 - 25
	maxi = (getPlayerLevel(cid) * 2.5 + getPlayerMagLevel(cid) * 3) * 5.2 

	if isInArray(vocations,getPlayerVocation(cid)) then 
		doSendMagicEffect(getThingPos(cid), 1)
		doCreatureSay(cid,"Donate Mana",19)
		doPlayerAddMana(cid, math.random(mini, maxi))
	else
		doPlayerSendCancel(cid, "Sorry but you dont have required vocation, to use mana rune.")
		end
	return true
end

then in your data/actions/actions.xml
post the following:
XML:
	<action itemid="ITEMIDYOUWANT" event="script" value="donaterune.lua"/>
 
Last edited:
here we are:
in your data/actions/scripts
make file name donaterune.lua
and post the following:
Lua:
local vocations = {1,2,3,4,5,6,7,8} 
 
function onUse(cid, item, frompos, item2, topos)
 
if isInArray(vocations,getPlayerVocation(cid)) then
 
doSendMagicEffect(topos,1)
doCreatureSay(cid,"Donate Mana",19)
mini = (getPlayerLevel(cid) * 2.5 + getPlayerMagLevel(cid) * 3) * 4.6 - 25
maxi = (getPlayerLevel(cid) * 2.5 + getPlayerMagLevel(cid) * 3) * 5.2
 
    if doPlayerAddMana(cid, math.random(mini, maxi)) == LUA_ERROR then
        return FALSE
    end
else
 
        doPlayerSendCancel(cid, 'You can not use this item.')
end
    return true
end

then in your data/actions/actions.xml
post the following:
XML:
	<action itemid="ITEMIDYOUWANT" event="script" value="donaterune.lua"/>
you sure this is healing mana? lol
 
[01/01/2013 13:41:10] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/donate mana.lua)
[01/01/2013 13:41:10] data/actions/scripts/donate mana.lua:10: unexpected symbol near '=='
 
ok sorry , try this
here we are:
in your data/actions/scripts
make file name donaterune.lua
and post the following:
Lua:
function onUse(cid, item, frompos, item2, topos)
	local vocations = {1,2,3,4,5,6,7,8}    
  
	mini = (getPlayerLevel(cid) * 2.5 + getPlayerMagLevel(cid) * 3) * 4.6 - 25
	maxi = (getPlayerLevel(cid) * 2.5 + getPlayerMagLevel(cid) * 3) * 5.2 

	if isInArray(vocations,getPlayerVocation(cid)) then 
		doSendMagicEffect(getThingPos(cid), 1)
		doCreatureSay(cid,"Donate Mana",19)
		doPlayerAddMana(cid, math.random(mini, maxi))
	else
		doPlayerSendCancel(cid, "Sorry but you dont have required vocation, to use mana rune.")
		end
	return true
end

then in your data/actions/actions.xml
post the following:
XML:
	<action itemid="ITEMIDYOUWANT" event="script" value="donaterune.lua"/>
 
Last edited:
This is what Tarjei said:

Step 1.
Set action id on portal.
Step 2.
Make a movement script and save all data into storagevalues .. (it can be saved with using less but I guess you wont be able to make that though)
Step 3.
Set level and all skills to begin thing.
Step 4
Make another portal that will read those storages you saved before.
Step 5.
Restore level and skills.

All this stuff can be made with basic tfs API functions
 
This is what Tarjei said:

Step 1.
Set action id on portal.
Step 2.
Make a movement script and save all data into storagevalues .. (it can be saved with using less but I guess you wont be able to make that though)
Step 3.
Set level and all skills to begin thing.
Step 4
Make another portal that will read those storages you saved before.
Step 5.
Restore level and skills.

All this stuff can be made with basic tfs API functions

This won't work if you gain exp or levels, when you are inside that "room" Ex. you get downgrade from level (8) to level 1, then if you are lvling up in that room to level 4. And go back you want get level 12, you will get only level 8.

I can make it possible, but to lazy to put effort and time into it.
 
I'm requesting an NPC that will give a player a house (cost optional/config) from a range of house ids. It will only give the player a house if he does not already own one. Also, it has to check if the house is already owned. If all the houses are owned in the range of ids, the npc would just say "all the houses are taken".
 
Back
Top