Jump to content

Remove gold by quest


Recommended Posts

Hello,I am trying to remove player gold, but there is not function for that, I tried that like that:
 

Spoiler

 

[...]

                else
                    pc.change_gold((pc.get_gold() - 10000000))
                    pc.polymorph(101, 3600)
                    return

[...]

 

But this method duplicates my yangs.. How can I make it?

Thank you.

Link to comment
Share on other sites

  • Premium

Hi.

To remove gold from a player, use the function like this:

else
	if pc.get_gold() >= 10000000 then --check if player got required gold
		pc.change_gold(-10000000) --remove gold from player
		pc.polymorph(101, 3600) --your code
	else
		syschat("You need at least 10.000.000 gold") --message in red warning about gold requirement
return 

 

  • Good 1
  • Love 1
Link to comment
Share on other sites

29 minutes ago, tierrilopes said:

Hi.

To remove gold from a player, use the function like this:


else
	if pc.get_gold() >= 10000000 then --check if player got required gold
		pc.change_gold(-10000000) --remove gold from player
		pc.polymorph(101, 3600) --your code
	else
		syschat("You need at least 10.000.000 gold") --message in red warning about gold requirement
return 

 

Thank you very much! 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.