diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-07-01 00:48:05 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-07-01 00:48:05 -0300 |
commit | 1d428cad88a591b20adb06461749ed40e9dc9f0a (patch) | |
tree | 570a0f474b7e1bab8d88b2b2a3f09919252568d8 /npc/items | |
parent | a1caba905ca63806d8cff87e12777c7bf0551f57 (diff) | |
download | serverdata-1d428cad88a591b20adb06461749ed40e9dc9f0a.tar.gz serverdata-1d428cad88a591b20adb06461749ed40e9dc9f0a.tar.bz2 serverdata-1d428cad88a591b20adb06461749ed40e9dc9f0a.tar.xz serverdata-1d428cad88a591b20adb06461749ed40e9dc9f0a.zip |
Bad order %%m
Diffstat (limited to 'npc/items')
-rw-r--r-- | npc/items/shovel.txt | 63 |
1 files changed, 32 insertions, 31 deletions
diff --git a/npc/items/shovel.txt b/npc/items/shovel.txt index 8977ddfb8..be9daab1b 100644 --- a/npc/items/shovel.txt +++ b/npc/items/shovel.txt @@ -6,6 +6,38 @@ // Description: // NPC to use shovel (dig, bury etc) +// shovel_scriptItem( map, x, y, item, {amount} ) +function script shovel_scriptItem { + .@map$=getarg(0); + .@x=getarg(1); + .@y=getarg(2); + .@id=getarg(3); + .@amount=getarg(4,1); + + .@wtc = getarraysize($@WBT_Random_id); + $@WBT_Random_id[.@wtc] = .@id; + $@WBT_Random_amount[.@wtc] = .@amount; + $@WBT_Random_map$[.@wtc] = .@map$; + $@WBT_Random_x[.@wtc] = .@x; + $@WBT_Random_y[.@wtc] = .@y; + debugmes "Buried"+.@amount+" "+getitemname(.@id); +} + +// shovel_scatter( map, x1, y1, x2, y2, items_array, {amount} ) +function script shovel_scatter { + .@map$=getarg(0); + .@x1=getarg(1); + .@y1=getarg(2); + .@x2=getarg(3); + .@y2=getarg(4); + .@id=getarg(5); + .@amount=getarg(6,1); + + for (.@i = 0; .@i < .@amount; .@i++) + shovel_scriptItem(.@map$, rand(.@x1,.@x2), rand(.@y1,.@y2), any_of(.@id)); + +} + - script Shovel -1,{ function CheckDigLocation { @@ -280,35 +312,4 @@ function script shovel_adddigrect { return 1; } -// shovel_scriptItem( map, x, y, item, {amount} ) -function script shovel_scriptItem { - .@map$=getarg(0); - .@x=getarg(1); - .@y=getarg(2); - .@id=getarg(3); - .@amount=getarg(4,1); - - .@wtc = getarraysize($@WBT_Random_id); - $@WBT_Random_id[.@wtc] = .@id; - $@WBT_Random_amount[.@wtc] = .@amount; - $@WBT_Random_map$[.@wtc] = .@map$; - $@WBT_Random_x[.@wtc] = .@x; - $@WBT_Random_y[.@wtc] = .@y; - debugmes "Buried"+.@amount+" "+getitemname(.@id); -} - -// shovel_scatter( map, x1, y1, x2, y2, items_array, {amount} ) -function script shovel_scatter { - .@map$=getarg(0); - .@x1=getarg(1); - .@y1=getarg(2); - .@x2=getarg(3); - .@y2=getarg(4); - .@id=getarg(5); - .@amount=getarg(6,1); - - for (.@i = 0; .@i < .@amount; .@i++) - shovel_scriptItem(.@map$, rand(.@x1,.@x2), rand(.@y1,.@y2), any_of(.@id)); - -} |