- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register


Click here to create your own public paste ~ ~ click to duplicate and edit this paste


TitleUntitled Paste
TypeDenizen Script
Date2017/05/05 19:18:43 UTC-07:00
ByGuest
Other
Paste
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
3800
sp_buypower_take:
  type: task
  debug: true
  speed: 0t
  script:
  - define player_buypower "<def[player_buypower]||<proc[sp_buypower]>>"
  # sp.buypower.<region||default>.<e-id||npcid>
  - define flag_destination "sp.buypower.<player.flag[erpg_region]||general>.<def[npcid].flag[e-id] || <def[npcid]>   >"
  # <destination> :  <proc[buypower]> - ( ( wert * clicktype_factor||1 ) * 100 .as_int  )||unbegrenzt
  - if <def[player_buypower]> matches number {
    - flag player "<def[flag_destination]>:<def[player_buypower].mul[100].sub[<def[worth].mul[<def[clicktype_factor]||1>].mul[100]>].as_int||unbegrenzt>"
    }

sp_buypower_add:
  type: task
  debug: true
  speed: 0t
  script:
  - define player_buypower "<def[player_buypower]||<proc[sp_buypower]>>"
  - define flag_destination "sp.buypower.<player.flag[erpg_region]||general>.<def[npcid].flag[e-id] || <def[npcid]>   >"
  - if <def[player_buypower]> matches number {
    - flag player "<def[flag_destination]>:<def[player_buypower].mul[100].add[<def[worth].mul[<def[clicktype_factor]||1>].mul[100]>].as_int||unbegrenzt>"
    }

#Returns:
# players erpg buypower <FALLBACK> players general buypower <FALLBACK> npcs default buypower <FALLBACK> unbegrenzt
sp_buypower:
  type: procedure
  debug: true
  script:
  - define npcid <player.flag[sp.talking_to].as_npc>
  - define flag_source "<player.flag[sp.buypower.<player.flag[erpg_region]||general>.<def[npcid].flag[e-id] || <def[npcid]>   >]  || <def[npcid].flag[sp.buypower].as_int||x> >"
  - if <def[flag_source]> matches number {
    - determine "<def[flag_source].div[100]>"
    } else {
    - determine unbegrenzt
    }



RawRaw



Pastes made: 72180