On_PlayerGathering
-
Method:
On_PlayerGathering
Argument(s):
1: Fougerite.Player Player
2: GatherEvent ge
Examples:
Python:
Code (Python):def On_PlayerGathering(self, Player, GatherEvent):
if GatherEvent.Item == "Wood":
Player.Inventory.AddItem(GatherEvent.Item, 20)
Player.Message("You have got an extra 20 " + GatherEvent.Item)
elif GatherEvent.Item == "Sulfur Ore":
Player.Inventory.AddItem(GatherEvent.Item, 20)
Player.Message("You have got an extra 20 " + GatherEvent.Item)
Javascript:
Code (Javascript):function On_PlayerGathering(Player, GatherEvent) {
switch (GatherEvent.Item) {
case 'Wood':
Player.Inventory.AddItem(GatherEvent.Item, 20);
Player.Message("You have got an extra 20 " + GatherEvent.Item);
break;
case 'Sulfur Ore':
Player.Inventory.AddItem(GatherEvent.Item, 20);
Player.Message("You have got an extra 20 " + GatherEvent.Item);
break;
}
}
C#:
Code (C#):...
XenCarta PRO
© Jason Axelrod from 8WAYRUN.COM