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

TalkAction Simple (NEW!) Buy AOL Command

R3ignlasting

Well-Known Member
Joined
Nov 20, 2008
Messages
1,293
Reaction score
82
Okay guys, I'm a little crusty from scripting, so, this was a quick thing I whipped up. You'll be seeing some more scripts from me lately. Also, all of my scripts, will be tagged with 'R3ignlasting' so whenever you search that tag, you'll get a list of all my scripts. Anyway, let's get on with the script. Here it is.

Code:
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid,15000) == 1 then
	doPlayerAddItem(cid,2173,1)
	doPlayerSendTextMessage(cid,22,"You've just spent 15,000 gold for an Amulet of Loss.")
else
	doPlayerSendCancel(cid,"You don't have enough money to buy that Amulet of Loss.")
	doSendMagicEffect(getPlayerPosition(cid),2)
end
return TRUE
end

That's just one script from me. Also, just to let you guys know. I forgot a few things about scripting, and I read Ragheed's quick tutorial, and it got me back where I was. In the intermediate levels of scripting. I thank you, and no more tutorials for me, I am going to do all natural scripting from now on without any help, hopefully.
 
Last edited:
Yup, you were a little rusty on scripting, don't worry you will warm up to it. Here you where missing an 'end' and i was not sure about 'if
doPlayerRemoveMoney' so I changed it:
Code:
function onSay(cid, words, param)
local price = 15000
	if getPlayerMoney(cid) == price then
		doPlayerRemoveMoney(cid, price)
		doPlayerAddItem(cid,2173,1)
		doPlayerSendTextMessage(cid,22,"You've just spent ".. price .." gold for an Amulet of Loss.")
	else
		doPlayerSendCancel(cid,"You don't have enough money to buy that Amulet of Loss.")
		doSendMagicEffect(getPlayerPosition(cid),2)		
	end
return true
end
 
Okay guys, I'm a little crusty from scripting, so, this was a quick thing I whipped up. You'll be seeing some more scripts from me lately. Also, all of my scripts, will be tagged with 'R3ignlasting' so whenever you search that tag, you'll get a list of all my scripts. Anyway, let's get on with the script. Here it is.

Code:
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid,15000) == 1 then
    doPlayerAddItem(cid,2173,1)
    doPlayerSendTextMessage(cid,22,"You've just spent 15,000 gold for an Amulet of Loss.")
else
    doPlayerSendCancel(cid,"You don't have enough money to buy that Amulet of Loss.")
    doSendMagicEffect(getPlayerPosition(cid),2)
end
return TRUE
That's just one script from me. Also, just to let you guys know. I forgot a few things about scripting, and I read Ragheed's quick tutorial, and it got me back where I was. In the intermediate levels of scripting. I thank you, and no more tutorials for me, I am going to do all natural scripting from now on without any help, hopefully.

dude Ragheed sucks :x
 
From OTFans? I wasn't saying he was aweosme, but, I just followed a quick tutorial to see the functions. I was too lazy to go into my server folder to look at all of the functions from a file that I have to open.

Also, I know that this script has been released over 99,999 times.

By the way, 375311, I tested the script I posted and it works fine.
 
change
Lua:
if getPlayerMoney(cid) == price then
		doPlayerRemoveMoney(cid, price)

to

Lua:
if doPlayerRemoveMoney(cid,price) then
 
Lua:
function onSay(cid, words, param)
if doCreatureRemoveMoney(cid, 10000) then and doCreatureSendTextMessage(cid,22,"You\'ve just spent 10,000 gold for an Amulet of Loss.")
else
	doCreatureSendCancel(cid,"You don\'t have enough money to buy that Amulet of Loss.") and doSendMagicEffect(getPlayerPosition(cid),2)
return TRUE
end
stop making 10000 threads abt an aol make harder scripts like it remove an random % of the % of the players health compared with the players mana %

idk but aol is easy...
 
Lua:
function onSay(cid, words, param)
if doCreatureRemoveMoney(cid, 10000) then and doCreatureSendTextMessage(cid,22,"You\'ve just spent 10,000 gold for an Amulet of Loss.")
else
	doCreatureSendCancel(cid,"You don\'t have enough money to buy that Amulet of Loss.") and doSendMagicEffect(getPlayerPosition(cid),2)
return TRUE
end
stop making 10000 threads abt an aol make harder scripts like it remove an random % of the % of the players health compared with the players mana %

idk but aol is easy...

Geez, give a guy a break. I know how to script, I was just submitting a new piece of work to the forum, showing that I was going to start scripting again.
 
Lua:
function onSay(cid, words, param)
if doCreatureRemoveMoney(cid, 10000) then and doCreatureSendTextMessage(cid,22,"You\'ve just spent 10,000 gold for an Amulet of Loss.")
else
	doCreatureSendCancel(cid,"You don\'t have enough money to buy that Amulet of Loss.") and doSendMagicEffect(getPlayerPosition(cid),2)
return TRUE
end
stop making 10000 threads abt an aol make harder scripts like it remove an random % of the % of the players health compared with the players mana %

idk but aol is easy...

lmfao

if aol is easy to script how come u can't make it?
 
Last edited:
Lua:
function onSay(cid, words, param)
if doCreatureRemoveMoney(cid, 10000) then and doCreatureSendTextMessage(cid,22,"You\'ve just spent 10,000 gold for an Amulet of Loss.")
else
	doCreatureSendCancel(cid,"You don\'t have enough money to buy that Amulet of Loss.") and doSendMagicEffect(getPlayerPosition(cid),2)
return TRUE
end
stop making 10000 threads abt an aol make harder scripts like it remove an random % of the % of the players health compared with the players mana %

idk but aol is easy...

Geez, give a guy a break. I know how to script, I was just submitting a new piece of work to the forum, showing that I was going to start scripting again.

It doesn't matter, his won't even work.. he can't script for shit.. every script he posts don't work :s
 
Well, I have problem.

Script takes the money but it dont give aol.

TFS 0.3.5pl1
 
Who cares if it's been done before? Just click your egoistic ass out of this thread rightaway then.. such flamers.
 
Back
Top