• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Mount system

Code:
[18/06/2010 15:31:17] [Error - Action Interface] 
[18/06/2010 15:31:17] data/actions/scripts/mountsystem.lua:onUse
[18/06/2010 15:31:17] Description: 
[18/06/2010 15:31:17] data/actions/scripts/mountsystem.lua:19: attempt to index local 'r' (a nil value)
[18/06/2010 15:31:17] stack traceback:
[18/06/2010 15:31:17] 	data/actions/scripts/mountsystem.lua:19: in function <data/actions/scripts/mountsystem.lua:17>

[18/06/2010 15:31:18] [Error - Action Interface] 
[18/06/2010 15:31:18] data/actions/scripts/mountsystem.lua:onUse
[18/06/2010 15:31:19] Description: 
[18/06/2010 15:31:19] data/actions/scripts/mountsystem.lua:19: attempt to index local 'r' (a nil value)
[18/06/2010 15:31:19] stack traceback:
[18/06/2010 15:31:19] 	data/actions/scripts/mountsystem.lua:19: in function <data/actions/scripts/mountsystem.lua:17>

[18/06/2010 15:31:21] [Error - Action Interface] 
[18/06/2010 15:31:21] data/actions/scripts/mountsystem.lua:onUse
[18/06/2010 15:31:21] Description: 
[18/06/2010 15:31:21] data/actions/scripts/mountsystem.lua:19: attempt to index local 'r' (a nil value)
[18/06/2010 15:31:21] stack traceback:
[18/06/2010 15:31:21] 	data/actions/scripts/mountsystem.lua:19: in function <data/actions/scripts/mountsystem.lua:17>

[18/06/2010 15:31:36] [Error - Action Interface] 
[18/06/2010 15:31:36] data/actions/scripts/mountsystem.lua:onUse
[18/06/2010 15:31:37] Description: 
[18/06/2010 15:31:37] data/actions/scripts/mountsystem.lua:19: attempt to index local 'r' (a nil value)
[18/06/2010 15:31:37] stack traceback:
[18/06/2010 15:31:37] 	data/actions/scripts/mountsystem.lua:19: in function <data/actions/scripts/mountsystem.lua:17>

Someone help me?
 
[id items] = {article='a' ,name='wolf', text='Mount, wolf!', dtext='Demount, wolf!', s=100, condition=wolfCondition},

Haate id you need to change what they entered in actions.xml

@pl

Haate zmień id tam wpisz te co podałeś w actions.xml i będzie chodzić :p
 
Last edited:
[19/06/2010 10:50:37] [Error - Action Interface]
[19/06/2010 10:50:37] data/actions/scripts/mount system.lua:eek:nUse
[19/06/2010 10:50:37] Description:
[19/06/2010 10:50:37] data/actions/scripts/mount system.lua:19: attempt to index local 'r' (a nil value)
[19/06/2010 10:50:37] stack traceback:
[19/06/2010 10:50:37] data/actions/scripts/mount system.lua:19: in function <data/actions/scripts/mount system.lua:17>
I just CTRL + C and CTRL + V it. (The Script).
In Actions.xml:
<!-- mounting -->
<action itemid="1689" event="script" value="mount system.lua"/>
ITEMID 1689 = a yellow round pillow.
I tested it on TFS 0.3.6PL1 (8.54-8.57).

Reply plx?
 
Last edited:
@up
[id items] = {article='a' ,name='wolf', text='Mount, wolf!', dtext='Demount, wolf!', s=100, condition=wolfCondition},

[id items] < write " 1689 "


@@@@@@@@@@@@@@@@@@@@@@@@@@
what do I do this only if they need only knight?
 
Code:
------------------------------------
--- don't change if you are noob ---
------------------------------------
function onUse(cid, item, fromPosition, itemEx, toPosition)
        local v, r = getCreaturePosition(cid), t[item.itemid]
        local s = r.s
        local pos = {x = v.x, y = v.y, z = v.z}
        if r then
			if getPlayerVocation == 4 then
                if getPlayerStorageValue(cid, s) <= 0 then
                        doSendMagicEffect(pos, 10)
                        doCreatureSay(cid, r.text, 19)
                        setPlayerStorageValue(cid, s, 1)
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have mounted ' .. r.article .. ' '.. r.name .. '.')
                        return doAddCondition(cid, r.condition)  
                elseif getPlayerStorageValue(cid, s) == 1 then
                        doSendMagicEffect(pos, 10)
                        doCreatureSay(cid, r.dtext, 19)
                        setPlayerStorageValue(cid, s, 0)
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have demounted ' .. r.article .. ' '.. r.name .. '.')
                        return doRemoveCondition(cid, CONDITION_OUTFIT)
                else
                        return doPlayerSendCancel(cid, 'You can\'t do this.')
                end
			else
				doPlayerSendTextMessage(cid,20,'Only knights can use this.')
			end
        else
                return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'There has been some error, try contacting a staff member.')
        end
end

replace this part.
 
use this for that.
not 100% sure, not the best at spells.

Lua:
  --------------------
---- CONDITION -----
--------------------
local wolfSpeed = createConditionObject(CONDITION_HASTE)
setConditionParam(wolfSpeed, CONDITION_PARAM_TICKS,-1) --- -1 = infinite haste or use calculate minutes*60*1000 in a calculator and put result there.
setConditionFormula(wolfSpeed, 0.3, -24, 0.3, -24)
local wolfCondition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(wolfCondition, CONDITION_PARAM_TICKS, -1)
addOutfitCondition(wolfCondition, {lookType = 4, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0})
--------------------
----- config -------
--------------------
local t =   {
        [7443] = {article='a' ,name='wolf', text='Mount, wolf!', dtext='Demount, wolf!', s=100, condition=wolfCondition, speedcondition=wolfSpeed},
}      

------------------------------------
--- don't change if you are noob ---
------------------------------------
function onUse(cid, item, fromPosition, itemEx, toPosition)
        local v, r = getCreaturePosition(cid), t[item.itemid]
        local s = r.s
        local pos = {x = v.x, y = v.y, z = v.z}
        if r then
                if getPlayerStorageValue(cid, s) <= 0 then
                        doSendMagicEffect(pos, 10)
                        doCreatureSay(cid, r.text, 19)
                        setPlayerStorageValue(cid, s, 1)
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have mounted ' .. r.article .. ' '.. r.name .. '.')
						doAddCondition(cid, r.speedcondition)  
                        return doAddCondition(cid, r.condition)  
                elseif getPlayerStorageValue(cid, s) == 1 then
                        doSendMagicEffect(pos, 10)
                        doCreatureSay(cid, r.dtext, 19)
                        setPlayerStorageValue(cid, s, 0)
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have demounted ' .. r.article .. ' '.. r.name .. '.')
						doRemoveCondition(cid,CONDITION_HASTE)
                        return doRemoveCondition(cid, CONDITION_OUTFIT)
                else
                        return doPlayerSendCancel(cid, 'You can\'t do this.')
                end
        else
                return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'There has been some error, try contacting a staff member.')
        end
end
 
hi do not understand your bridge toll system you could make a monster and better explain I am a little noob in this of scrpits
 
Hey Can you help Me? Look i Get This Error >>
Code:
[20/06/2010 16:48:11] [Error - Action Interface] 
[20/06/2010 16:48:11] data/actions/scripts/Mounting/mountsystem.lua:onUse
[20/06/2010 16:48:11] Description: 
[20/06/2010 16:48:11] data/actions/scripts/Mounting/mountsystem.lua:9: attempt to index local 'r' (a nil value)
[20/06/2010 16:48:11] stack traceback:
[20/06/2010 16:48:11] 	data/actions/scripts/Mounting/mountsystem.lua:9: in function <data/actions/scripts/Mounting/mountsystem.lua:7>
Plis Help );
 
that speed script thingy wont work :/

EDIT:
nvm i got it :p i forgot to copy something :p

o ye kan you make a edit so you cant do mount in pz and can get in with mount should be cool
and male and female have dif mounts
understand what i mean? :p
 
Last edited:
[id items] = {article='a' ,name='wolf', text='Mount, wolf!', dtext='Demount, wolf!', s=100, condition=wolfCondition},

cesar10 id you need to change what they entered in actions.xml
 
Heya. I have a request on your script idk if you have some time but i'd be grateful if someone could help me out.

I need it like; you can only mount yourself if you don't have PZ lock , also while you are mounted , you cannot attack anyone/anything [but others can attack you]

I think it can be done via setting the flags.
 
Back
Top