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

RuggedMage Scripting thread.

Rugged Mage

Lua Scripter
Joined
Mar 8, 2010
Messages
1,182
Solutions
2
Reaction score
74
I'll help you guys with almost any script unless it looks like it'll take a super long time :p. I mainly do talkaction and action scripts so it might take me a little longer to do other scripts, but give me time. Anyways post your requests away if you have any.
 
Lua:
function onSay(cid, words, param)
		local money = 300000
			if getPlayerMoney(cid) >= money and getplayerlevel(cid) <=99 then
				doPlayerRemoveMoney(cid, money)
					doPlayerAddExperience(cid, 15694800) -- or you can use doPlayerAddLevel(cid, 100)
							else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry but you don't have enough money to buy levels.")
				end
		return true
	end
like this?
 
a script that makes effect "15" on the character thats writen in the script so if put like "Landera" in the script only this character gets this effect every second
 
Lua:
function onSay(cid, words, param)
		local money = 300000
			if getPlayerMoney(cid) >= money and getplayerlevel(cid) <=99 then
				doPlayerRemoveMoney(cid, money)
					doPlayerAddExperience(cid, 15694800) -- or you can use doPlayerAddLevel(cid, 100)
							else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry but you don't have enough money to buy levels.")
				end
		return true
	end
like this?

Btw isn't
Lua:
else doPlayerSendTextMessage

Supposed to be:

Lua:
else doPlayerSendCancel

?

And add an effect to when it fails (pref. 2 the poofy cloud)


and
Lua:
getplayerlevel(cid) <=99 then

not sure about this but isnt it supposed to be
Lua:
getPlayerLevel(cid)
(cap every first after the first word)

and isn't

Lua:
doPlayerAddExperience(cid, 15694800)
bad because it adds a flat exp amount? so if you are level 99 you get alot higher than 100?
 
Last edited:
And isn't your typing supposed to be like this? Instead
Of
This
Isn't
It?
I
Think
So. Landera I'll do that script when I get home from wrestling practice

- - - Updated - - -

@Landera this is the script, but I think something looks wrong with it, just not sure what yet :p. If there are any errors just tell me and I'll try my best to fix them!
Lua:
-- Created using QtLuaPad on Mon Aug 26 2013
-- Written by: RuggedMage.

function onThink(interval, lastExecution)
	for _, name in ipairs(getOnlinePlayers()) do
		local cid = getPlayerByName(Landera)
			if getPlayerName(cid) then
				doSendMagicEffect(getPlayerPosition(cid),15)
			end
			end
		return true
	end

[Xml] <globalevent name="15" interval="60000" script="15.lua"/>[/Xml]
 
Last edited:
And isn't your typing supposed to be like this? Instead
Of
This
Isn't
It?
I
Think
So. Landera I'll do that script when I get home from wrestling practice

- - - Updated - - -

@Landera this is the script, but I think something looks wrong with it, just not sure what yet :p. If there are any errors just tell me and I'll try my best to fix them!
Lua:
-- Created using QtLuaPad on Mon Aug 26 2013
-- Written by: RuggedMage.

function onThink(interval, lastExecution)
for _, name in ipairs(getOnlinePlayers()) do
local cid = getPlayerByName(Landera)
if getPlayerName(cid) then
doSendMagicEffect(getPlayerPosition(cid),15)
end
end
return true
end

[Xml] <globalevent name="15" interval="60000" script="15.lua"/>[/Xml]
Well funny how I helped you and you're acting like a fucktard and no,
it
didn't
look
like
this

I was obviously talking about different stuff so of course there were spaces... idiot.
 
Stop getting on every thread and raging like a little kid.... and stop pming me gay stuff. You honestly should be banned I would think, but I'm not an admin so I can't enforce that.
 
Lua:
function onSay(cid, words, param)
local money = 300000
if getPlayerMoney(cid) >= money and getplayerlevel(cid) <=99 then
doPlayerRemoveMoney(cid, money)
doPlayerAddExperience(cid, 15694800) -- or you can use doPlayerAddLevel(cid, 100)
else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry but you don't have enough money to buy levels.")
end
return true
end
like this?

change
doPlayerAddExperience(cid, 15694800)
to
doPlayerAddExperience(cid, (getExperienceForLevel(100) - getPlayerExperience(cid)))

as well as
Btw isn't
Lua:
else doPlayerSendTextMessage

Supposed to be:

Lua:
else doPlayerSendCancel

?

And add an effect to when it fails (pref. 2 the poofy cloud)

doesn't particularly matter.
 
change
doPlayerAddExperience(cid, 15694800)
to
doPlayerAddExperience(cid, (getExperienceForLevel(100) - getPlayerExperience(cid)))

as well as
Btw isn't
Lua:
else doPlayerSendTextMessage

Supposed to be:

Lua:
else doPlayerSendCancel

?

And add an effect to when it fails (pref. 2 the poofy cloud)

doesn't particularly matter.
Yeah, thanks for telling him once again, he doesn't seem to care, lol.
Now he's saying that I "rage" because I corrected him AND he's saying I'm pming him gay stuff, when all I said was why he's saying that I "troll every thread".
If anyone, then he should be banned.
 
My request is when a player equip an amulet is transformed to monster (Looktype = 300) but save the colors and the outfit that previously had the player
So that when he unequip the amulet, has the same outfit and colors as before using the amule
 
And isn't your typing supposed to be like this? Instead
Of
This
Isn't
It?
I
Think
So. Landera I'll do that script when I get home from wrestling practice

- - - Updated - - -

@Landera this is the script, but I think something looks wrong with it, just not sure what yet :p. If there are any errors just tell me and I'll try my best to fix them!
Lua:
-- Created using QtLuaPad on Mon Aug 26 2013
-- Written by: RuggedMage.

function onThink(interval, lastExecution)
for _, name in ipairs(getOnlinePlayers()) do
local cid = getPlayerByName(Landera)
if getPlayerName(cid) then
doSendMagicEffect(getPlayerPosition(cid),15)
end
end
return true
end

[Xml] <globalevent name="15" interval="60000" script="15.lua"/>[/Xml]


script didnt work no errors at all
 
script didnt work no errors at all

This is what you wanted right?
Code:
function onThink(interval, lastExecution)
    for _, cid in ipairs(getOnlinePlayers()) do
        if ( getPlayerName(cid) == 'Landera' ) then
        doSendMagicEffect(getPlayerPosition(cid), 15)
        end
    end   
return true
end
 
This is what you wanted right?
Code:
function onThink(interval, lastExecution)
    for _, cid in ipairs(getOnlinePlayers()) do
        if ( getPlayerName(cid) == 'Landera' ) then
        doSendMagicEffect(getPlayerPosition(cid), 15)
        end
    end 
return true
end
Oh yeah, duh. That's why my script didn't look right, I did (landera) and forgot cid. Ty
 
This is what you wanted right?
Code:
function onThink(interval, lastExecution)
    for _, cid in ipairs(getOnlinePlayers()) do
        if ( getPlayerName(cid) == 'Landera' ) then
        doSendMagicEffect(getPlayerPosition(cid), 15)
        end
    end  
return true
end

also not working :p
 
Back
Top