VoidExpanse/scope-player: Difference between revisions
No edit summary |
Atomic-admin (talk | contribs) No edit summary |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 9: | Line 9: | ||
== List of functions == | == List of functions == | ||
{{Scripting_api|AddAccess| | |||
* string: player_name | |||
* string: access_key| | |||
void| | |||
<pre style="margin:0px;">player.AddAccess("dlirry", "order_3");</pre> | | |||
Grants player specified access. | |||
}} | |||
{{Scripting_api|RemoveAccess| | |||
* string: player_name | |||
* string: access_key| | |||
void| | |||
<pre style="margin:0px;">player.RemoveAccess("dlirry", "order_3");</pre> | | |||
Removes from player specified access. | |||
}} | |||
{{Scripting_api|AddMoney| | {{Scripting_api|AddMoney| | ||
| Line 16: | Line 33: | ||
<pre style="margin:0px;">player.AddMoney("dlirry", 100500);</pre> | | <pre style="margin:0px;">player.AddMoney("dlirry", 100500);</pre> | | ||
Adds specified amount of money to a player. | Adds specified amount of money to a player. | ||
}} | |||
{{Scripting_api|AddQuestRewardMoney| | |||
* string: player_name | |||
* int: money| | |||
void| | |||
<pre style="margin:0px;">player.AddQuestRewardMoney("dlirry", 100500);</pre> | | |||
Adds specified amount of money to a player, but takes into account bonus to rewards that player might have from skills. | |||
}} | }} | ||
| Line 25: | Line 50: | ||
Adds specified amount of experience to player. | Adds specified amount of experience to player. | ||
The same effect as ship.SetCurrentValueDelta(2535, "experience", 100500); | The same effect as ship.SetCurrentValueDelta(2535, "experience", 100500); | ||
}} | |||
{{Scripting_api|AddQuestRewardExperience| | |||
* string: player_name | |||
* double: experience| | |||
void| | |||
<pre style="margin:0px;">player.AddQuestRewardExperience("dlirry", 100500);</pre> | | |||
Adds specified amount of experience to player, but takes into account bonus to rewards that player might have from skills. | |||
}} | }} | ||
| Line 30: | Line 63: | ||
* string: player_name| | * string: player_name| | ||
int: player's money| | int: player's money| | ||
<pre style="margin:0px;">var money = player.GetMoney("dlirry" | <pre style="margin:0px;">var money = player.GetMoney("dlirry");</pre> | | ||
Gets current amount of player's money | Gets current amount of player's money | ||
}} | }} | ||
| Line 45: | Line 78: | ||
* int: money| | * int: money| | ||
void| | void| | ||
<pre style="margin:0px;">vplayer.RemoveMoney("dlirry", | <pre style="margin:0px;">vplayer.RemoveMoney("dlirry", 100);</pre> | | ||
Removes specified amount of money from player. | Removes specified amount of money from player. | ||
}} | }} | ||
Latest revision as of 09:21, 10 October 2014
Scope player
Used to manage player-related stuff.
Visibility: Global.
List of functions
| AddAccess | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
player.AddAccess("dlirry", "order_3");
|
| Description | ||
|
Grants player specified access. | ||
| RemoveAccess | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
player.RemoveAccess("dlirry", "order_3");
|
| Description | ||
|
Removes from player specified access. | ||
| AddMoney | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
player.AddMoney("dlirry", 100500);
|
| Description | ||
|
Adds specified amount of money to a player. | ||
| AddQuestRewardMoney | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
player.AddQuestRewardMoney("dlirry", 100500);
|
| Description | ||
|
Adds specified amount of money to a player, but takes into account bonus to rewards that player might have from skills. | ||
| AddExperience | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
player.AddExperience("dlirry", 100500);
|
| Description | ||
|
Adds specified amount of experience to player. The same effect as ship.SetCurrentValueDelta(2535, "experience", 100500); | ||
| AddQuestRewardExperience | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
player.AddQuestRewardExperience("dlirry", 100500);
|
| Description | ||
|
Adds specified amount of experience to player, but takes into account bonus to rewards that player might have from skills. | ||
| GetMoney | ||
|---|---|---|
| Arguments | Returns | Example |
|
int: player's money |
var money = player.GetMoney("dlirry");
|
| Description | ||
|
Gets current amount of player's money | ||
| GetShipOfPlayer | ||
|---|---|---|
| Arguments | Returns | Example |
|
int: player's ship ID |
var ship_id = player.GetShipOfPlayer("dlirry");
|
| Description | ||
|
Returns ID of player's ship. | ||
| RemoveMoney | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
vplayer.RemoveMoney("dlirry", 100);
|
| Description | ||
|
Removes specified amount of money from player. | ||