[Help] Check, if player has gold bonusses

12/15/2013 18:38 xworldx#1
Hello, can somebody help me, how to check in client in python, if player buy gold or silver bonusses

something as

if player.POINT_MALL_EXPBONUS == True "
do soomething
....

this doesnt work and i dont know, how to do it

Thank you
12/15/2013 18:54 .HC'Destrox#2
I'm not sure if i got it right but if you mean what i think i have an answer for you:
Code:
quest something begin
	state start begin
		function has_mall_bonus()
			return mysql_query("SELECT COUNT(*) FROM account.account WHERE id='"..pc.get_account_id().."' AND (gold_expire>NOW() or silver_empire>NOW())")[1][1] == 1
		end
		when login begin
			if something.has_mall_bonus() then
				chat("You have an mall bonus (gold or silver)!")
			end
		end
	end
end
If you mean something else sorry^^

Kind Regards
12/15/2013 19:01 xworldx#3
this is in quest, but I need it in client
12/15/2013 19:47 xGr33n#4
Use cmdchat to send it to the client
12/15/2013 21:15 xworldx#5
2xGr33n: this variable isnt in player.*** ??
can you send some small help how to do it?
I want to show button in uitarget.py in def ShowDefaultButton(self):

self.showingButtonList.append(self.buttonDict[locale.TARGET_BUTTON.......***

for players with premium


Thx
12/16/2013 17:45 .HC'Destrox#6
It's automatically shown, isn't it?
I don't know why you need this :o

Kind Regards
12/16/2013 21:43 xworldx#7
show some button only for premium user
12/16/2013 22:02 .HC'Destrox#8
Just send a cmdchat (like xGr33n said) and if it receives this cmdchat you show a image (in the game.py).

Kind Regards