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

Action Xaroth Scripting Area [All Request will appear in Main post]

a question, i need my new voc, Holy archers to be able to use spirit potions,how should i do?

also, can u explain me how to get a backup of my DB? im moving server soon to a dedicated one so i need to transfer the accs without any loss

last one, i need to know how to decrease the MISSING chance that a spear does

remember i use TFS 0.3.4SPL2


thanks you :)
 
Last edited:
a question, i need my new voc, Holy archers to be able to use spirit potions,how should i do?

also, can u explain me how to get a backup of my DB? im moving server soon to a dedicated one so i need to transfer the accs without any loss

last one, i need to know how to decrease the MISSING chance that a spear does

remember i use TFS 0.3.4SPL2


thanks you :)


How to backup a DB = Export all tables from the DB into a sql file (I prefer zipped folder)
 
what about the other questions ? i need a script to make holy archer be able to use spirits!


edit: and thanks btw
 
It would be nice if someone explained how to move database from one pc to another. I have tried lot of ways(sql dump command, copying c:/xampp/mysql/data folder, and other export ways thought pma) but I always fail. Lot of people need that.
 
@up
There is "export/import" tool in PhpMyAdmin.

@topic
You should also improve your scripting. As far I seen you are making pretty messy scripts.

First thing I want you to notice are returns. Since one of the releases you shouldn't use 1/0. Now you have to use booleans, so return TRUE/ return FALSE

Same when you are checking values. You can't use now:
Code:
if(isPlayer(cid) == 1) then
but
Code:
if(isPlayer(cid) == TRUE) then

Regards,
Hermes
 
a question, i need my new voc, Holy archers to be able to use spirit potions,how should i do?

also, can u explain me how to get a backup of my DB? im moving server soon to a dedicated one so i need to transfer the accs without any loss

last one, i need to know how to decrease the MISSING chance that a spear does

remember i use TFS 0.3.4SPL2


thanks you :)

99% credits to whoever made it for cryingdamson4pl2 - TFS
Lua:
local MIN_HEALTH = 200
local MAX_HEALTH = 400
local MIN_MANA = 110
local MAX_MANA = 190
local EMPTY_POTION = 7635

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isPlayer(itemEx.uid) == FALSE then
		return FALSE
	end

	if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then
		doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
		return TRUE
	end

	if getPlayerVocation(cid) ~= 3 and getPlayerVocation(cid) ~= 7 or getPlayerLevel(itemEx.uid) < 80) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then
		doCreatureSay(itemEx.uid, "Only paladins of level 80 or above may drink this fluid.", TALKTYPE_ORANGE_1)
		return TRUE
	end

	if doCreatureAddHealth(itemEx.uid, math.random(MIN_HEALTH, MAX_HEALTH)) == LUA_ERROR or doPlayerAddMana(itemEx.uid, math.random(MIN_MANA, MAX_MANA)) == LUA_ERROR then
		return FALSE
	end

	doAddCondition(cid, exhaust)
	doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
	doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
	doTransformItem(item.uid, EMPTY_POTION)
	return TRUE
end
 
Hi. I need a script to trainers.
When he pulls a levler he teleports in to the training room and after 15 min he will be kicked.

Can you do something like that ?
:D
 
Hopefully you can still help.. i want a npc that will give a player certian items due to there vocation..
 
Help i got problem i get this error:
[05/10/2009 20:47:27] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/wallremove.lua)
[05/10/2009 20:47:27] data/actions/scripts/wallremove.lua:17: '<eof>' expected near 'end'

And this is my script:
-- function onUse(cid, item, frompos, item2, topos)

wall1 = {x=613, y=869, z=8, stackpos=1} --Position of the wall/stone
getwall1 = getThingfromPos(wall1)

if item.uid == 5011 and item.itemid == 1945 and getwall.itemid == 1026 then
doRemoveItem(getwall1.uid,1)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 5011 and item.itemid == 1946 then
doCreateItem(1026,1,wall1)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible")
end

return 1
end
 
Help i got problem i get this error:


And this is my script:
Sorry for the delay, didn't saw there was a request in this thread..

anyhow. this is the fixed script.

Lua:
function onUse(cid, item, frompos, item2, topos)
wall1pos = {x=613, y=869, z=8, stackpos=1} --Position of the wall/stone
getwall1 = getThingfromPos(wall1pos)

if item.uid == 5011 and item.itemid == 1945 and getwall.itemid == 1026 then
doRemoveItem(getwall1.uid,1)
doTransformItem(item.uid,item.itemid+1)
elseif item.uid == 5011 and item.itemid == 1946 then
doCreateItem(1026,1,wall1pos)
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry, not possible")
end

return 1
end
 

Lua:
function onUse(cid, item, frompos, item2, topos)
moneypos = {x=000, y=000, z=7, stackpos=1}
rewardpos = {x=000, y=000, z=7, stackpos=1}
getmoney = getThingfromPos(moneypos)
local lucky = math.random(1,10)

if item.uid == 123 and item.itemid == 1945 and getmoney.itemid == 2152 then
doTransformItem(item.uid,item.itemid+1)
if lucky == 1 then
doRemoveItem(getmoney.uid,1)
doCreateItem(2152,10,rewardpos)
doPlayerSendTextMessage(cid,22,"Congratulations! you won!")
else
doRemoveItem(getmoney.uid,1)
end
elseif item.uid == 123 and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry not possible.")
end
  return 1
  end

It's not tested, I don't have time for that now. please get back and tell me if it works or not, else post the error...

10% chance to win, pay a platinum coin and win 1k.
 
i need script men
i Need That When Player Steps in Pos: x= 1118 y= 735 z= 7
raid activates [its for trap ;p]
i hope you can help ;D
 
Lua:
function onUse(cid, item, frompos, item2, topos)
moneypos = {x=000, y=000, z=7, stackpos=1}
rewardpos = {x=000, y=000, z=7, stackpos=1}
getmoney = getThingfromPos(moneypos)
local lucky = math.random(1,10)

if item.uid == 123 and item.itemid == 1945 and getmoney.itemid == 2152 then
doTransformItem(item.uid,item.itemid+1)
if lucky == 1 then
doRemoveItem(getmoney.uid,1)
doCreateItem(2152,10,rewardpos)
doPlayerSendTextMessage(cid,22,"Congratulations! you won!")
else
doRemoveItem(getmoney.uid,1)
end
elseif item.uid == 123 and item.itemid == 1946 then
doTransformItem(item.uid,item.itemid-1)
else
doPlayerSendCancel(cid,"Sorry not possible.")
end
  return 1
  end

It's not tested, I don't have time for that now. please get back and tell me if it works or not, else post the error...

10% chance to win, pay a platinum coin and win 1k.


its 25% on the request..
local lucky = math.random(1,4)
 
Back
Top