Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #textdomain wesnoth-NX-RPG
- # Used in movetos to make sure the item can be picked up once
- #define IS_ITEM_TAKEN _ID _WML _WML2
- [if]
- {SXCON $unit.id|.inventory.picked_{_ID} equals yes}
- [or]
- {SXCON shared_inventory.inventory.picked_{_ID} equals yes}
- [/or]
- [then]
- [/then]
- [else]
- {_WML}
- [if]
- {SXCON continue_with_code equals yes}
- [then]
- {_WML2}
- {VARIABLE continue_with_code no}
- [/then]
- [/if]
- [/else]
- [/if]
- #enddef
- #define NX_CHEST_GOLD X Y AMOUNT
- [item]
- x={X}
- y={Y}
- image=items/chest-plain-closed.png
- [/item]
- [event]
- name=moveto
- [filter]
- x={X}
- y={Y}
- side=1
- [/filter]
- [object]
- duration=forever
- name= _ "Chest with gold"
- image=misc/coins_coppers.png
- description= _ "You have found a chest containing {AMOUNT} gold."
- [effect]
- [/effect]
- [/object]
- {MODIFY_SIDE_GOLD 1 {AMOUNT}}
- [floating_text]
- [filter]
- side=1,2,3,4,5
- role=player
- [/filter]
- text=_ "<span color='#e1e119'>{AMOUNT}</span>"
- [/floating_text]
- [sound]
- name=gold.ogg
- [/sound]
- {PLACE_IMAGE items/chest-plain-open.png {X} {Y}}
- [/event]
- #enddef
- # Magical ring that raises it's owner's defense in every terrain by 10%
- #define NX_CHEST_DEFRING X Y
- {PLACE_IMAGE items/ring-gold.png {X} {Y}}
- [event]
- name=moveto
- first_time_only=no
- [filter]
- x,y={X},{Y}
- side=1,2,3,4,5
- canrecruit=yes
- [/filter]
- [message]
- image=wesnoth-icon.png
- speaker=narrator
- message= _ "Would you like to take this magical ring?"
- [option]
- message= _ "I'll leave it for another player"
- [command]
- [/command]
- [/option]
- [option]
- message= _ "I think I'll take and use it"
- [command]
- [if]
- {SXCON defense_ring_{X}_{Y} not_equals 1}
- [then]
- [object]
- duration=forever
- name= _ "Ring of Defense"
- image=misc/bootsagil.png
- description= _ "You have found a strange, glowing ring. Wearing it will give its bearer +5% defense on all terrains."
- [effect]
- apply_to=defense
- replace=no
- [defense]
- deep_water=-5%
- shallow_water=-5%
- swamp_water=-5%
- reef=-5%
- flat=-5%
- sand=-5%
- forest=-5%
- hills=-5%
- mountains=-5%
- village=-5%
- castle=-5%
- cave=-5%
- frozen=-5%
- unwalkable=-5%
- impassable=-5%
- fungus=-5%
- [/defense]
- [/effect]
- [/object]
- [/then]
- [/if]
- [/command]
- [/option]
- [/message]
- {REMOVE_IMAGE {X} {Y}}
- [sound]
- name=magic-holy-1.ogg
- [/sound]
- [message]
- side=$side_number|
- message= _ "Ah...I have found a ring of defense. Already I feel more resistant to my foe's attacks."
- [/message]
- {VARIABLE_OP defring_$side_number add 1}
- {VARIABLE defense_ring_{X}_{Y} 1}
- [/event]
- #enddef
- # Green cloak that cloak reduces it's owner's movement costs in every category to 1
- #define NX_CHEST_CLOAK X Y
- {PLACE_IMAGE items/cloak-green.png {X} {Y}}
- [event]
- name=moveto
- first_time_only=no
- [filter]
- x,y={X},{Y}
- side=1,2,3,4,5
- canrecruit=yes
- [/filter]
- [if]
- {SXCON cloak_{X}_{Y} not_equals 1}
- [then]
- [message]
- image=wesnoth-icon.png
- speaker=narrator
- message= _ "You found a Green Cloak...Would you like to take it?
- [option]
- message= _ "No thanks, I'll leave it for another player"
- [command]
- [/command]
- [/option]
- [option]
- message= _ "I'll take and use this cloak"
- [command]
- [object]
- duration=forever
- name= _ "Green Cloak"
- image=items/cloak-green.png
- description= _ "You have found a silky green cloak. It seems to hold magic in its folds. It will reduce your Movement Costs in every category to 1."
- [effect]
- apply_to=movement_costs
- replace=yes
- [movement_costs]
- deep_water=1
- shallow_water=1
- swamp_water=1
- flat=1
- sand=1
- forest=1
- hills=1
- mountains=1
- village=1
- castle=1
- cave=1
- frozen=1
- unwalkable=1
- impassable=100
- fungus=1
- [/movement_costs]
- [/effect]
- [/object]
- [/command]
- [/option]
- [/message]
- [/then]
- [/if]
- {REMOVE_IMAGE {X} {Y}}
- [sound]
- name=magic-holy-1.ogg
- [/sound]
- [message]
- side=$side_number|
- message= _ "This cloak surely must be magical. Terrain that once impeded my progress now places no obstacle in my way; I can move with such ease I feel sometimes as if I were flying."
- [/message]
- {VARIABLE cloak_{X}_{Y} 1}
- [/event]
- #enddef
Add Comment
Please, Sign In to add comment