TalkAction Kick-Ass Script!

exique

Natala-ot.com
Joined
Sep 28, 2008
Messages
1,674
Best answers
0
Reaction score
23
Location
Sweden
Hotkey "!gold".

Hold it.

FRII CRASH PLX!!!!
 

loza

Oldschool
Joined
Oct 23, 2008
Messages
525
Best answers
0
Reaction score
6
everyone will use it to get money BTw why the gms need this ?-.-
 

Rachaw

Experienced Member
Joined
Oct 17, 2009
Messages
602
Best answers
0
Reaction score
1
Location
Tha Sweden
dont bump old threads lol, And maybe donators can use it with storage u can use it like 10 times per week idk,
 

Lakh

Banned User
Joined
Aug 17, 2011
Messages
189
Best answers
0
Reaction score
4
Location
Göteborg, Sweden
Heres somewhat of an edited version lol

Lua:
function onSay(cid, word, param)
	if getPlayerVocation(cid) == 1, 2, 3, 4 then
		doPlayerAddMoney(cid, 100000)
		doPlayerSendTextMessage(cid, 21, "You have now gotten your 10 Crystal Coins. Happy Hunting!")
		setPlayerStorageValue(cid, 54000, 1)
	end
	if getPlayerVocation(cid) == 5, 6, 7, 8 then
		doPlayerSendTextMessage(cid, 21, "You have gotten 5 crystal coins, since you are promoted.")
		doPlayerAddMoney(cid, 500000)
		setPlayerStorageValue(cid, 54000, 1)
	end
	if getPlayerStorageValue(cid) == 54000 then
		doPlayerSendCancel(cid, "You have already gotten your money."
	end
		return true
end
 

Teckman

Intermediate OT User
Joined
Jul 5, 2008
Messages
913
Best answers
0
Reaction score
132
Heres somewhat of an edited version lol

Lua:
function onSay(cid, word, param)
	if getPlayerVocation(cid) == 1, 2, 3, 4 then
		doPlayerAddMoney(cid, 100000)
		doPlayerSendTextMessage(cid, 21, "You have now gotten your 10 Crystal Coins. Happy Hunting!")
		setPlayerStorageValue(cid, 54000, 1)
	end
	if getPlayerVocation(cid) == 5, 6, 7, 8 then
		doPlayerSendTextMessage(cid, 21, "You have gotten 5 crystal coins, since you are promoted.")
		doPlayerAddMoney(cid, 500000)
		setPlayerStorageValue(cid, 54000, 1)
	end
	if getPlayerStorageValue(cid) == 54000 then
		doPlayerSendCancel(cid, "You have already gotten your money."
	end
		return true
end
It'd give money everytime. And why do you use "getPlayerVocation(cid) == 5, 6, 7, 8" better use isInArray().

Edited version:
Lua:
function onSay(cid, word, param)
	if getPlayerStorageValue(cid) == 54000 then
		if isInArray({1, 2, 3, 4}, getPlayerVocation(cid)) then
			doPlayerAddMoney(cid, 100000)
			doPlayerSendTextMessage(cid, 21, "You have now gotten your 10 Crystal Coins. Happy Hunting!")
			setPlayerStorageValue(cid, 54000, 1)
		elseif isInArray({5, 6, 7, 8}, getPlayerVocation(cid)) then
			doPlayerSendTextMessage(cid, 21, "You have gotten 5 crystal coins, since you are promoted.")
			doPlayerAddMoney(cid, 500000)
			setPlayerStorageValue(cid, 54000, 1)
		end
	else
		doPlayerSendCancel(cid, "You have already gotten your money."
	end
	return true
end
 

Syntax

Developer
Joined
Oct 10, 2007
Messages
2,846
Best answers
0
Reaction score
208
Location
Texas
It'd give money everytime. And why do you use "getPlayerVocation(cid) == 5, 6, 7, 8" better use isInArray().
Sorry I'm sort of new xD
Don't worry bout it everyone needs to learn somewhere. Here's my version. BTW this is an old thread and you probably shouldn't bump old threads, people usually frown upon that.

Lua:
function onSay(cid, word, param)
	local promoLv, storage, result = getPlayerPromotionLevel(cid), 54000, "You have already received your bonus money!"
	local rewards = {100000, 500000}
	if(getCreatureStorage(cid, storage) == -1)then
		local reward = rewards[promoLv+1]
		if(reward)then
			result = "You have received "..reward.." gold. Happy Hunting!"
			doCreatureSetStorage(cid, storage, 1)
			doPlayerAddMoney(cid, reward)
		end
	end
	return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, result)
end
Theres my version :p not tested ofc.
 
Top