-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGameObjAddMore.lic
66 lines (49 loc) · 3.05 KB
/
GameObjAddMore.lic
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
=begin
GameObjAddMore IS DEPRECATED, due to its existance causing Bigshot to behave badly for new users of that script
(and inadvertently cause denial-of-service attacks against the repository)
Note the issue here is with Bigshot, NOT GameObjAddMore, but I am voluntarily removing GameObjAddMore from the repository.
Please migrate to my newer script, 'xmlpatch', which replaces both GameObjAdd and GameObjAddMore as well as
THIS SCRIPT IS DEPRECATED, and will be removed from the repository in a few weeks.
This adds some specific items (and refines other items) to Lich's information that it uses to categorize different
kinds of items. This information is used by various scripts, including loot/sloot and various flavors,
;box and ;foreach
These additions are in addition to those in GameObjAdd.lic -- you probably want that script as well. However,
this script is not dependant on that one.
Add this to your autostart for all characters -- ;autostart add --global GameObjAddMore.
Note that the script only needs a few moments to do its thing and will NOT remain running once it is completed.
author: LostRanger (thisgenericname@gmail.com)
game: GS
tags: utility
required: Lich >= 4.6.0.
version: 0.2 (2017-07-24)
changelog:
version 0.2 (2017-07-24)
* THIS SCRIPT IS DEPRECATED, and will be removed from the repository in a few weeks. Complain loudly about that.
version 0.1 (2017-06-29)
* Initial release, mainly with refined criteria for boxes.
=end
wait_while { running?('repository')}
sleep 2
GameObj.load_data if GameObj.type_data.empty? or GameObj.type_data.nil?
sleep 1 # Avoid race conditions if GameObjAdd is also running. This is hacky, but should work.
# We allow 'shifting' so phased boxes still count as boxes.
box_adjectives = 'shifting|badly damaged|battered|corroded|dented|plain|rotting|scratched|simple|sturdy|weathered|acid-pitted|engraved|enruned|iron-bound'
box_materials = 'brass|fel|gold|haon|iron|maoral|mithril|modwir|monir|silver|steel|tanik|thanot|wooden'
box_nouns = 'box|chest|coffer|strongbox|trunk'
# Allow adjectives to be optional, since Lich won't report full item names if they're in the player's hands.
GameObj.type_data['box'][:name] = /^(?:(?:#{box_adjectives}) )?(?:#{box_materials}) (#{box_nouns})$/
GameObj.type_data['phased'] = {} unless GameObj.type_data['phased']
GameObj.type_data['phased'][:name] = /^shifting /
sleep 60 # So it gets seen after all the startup messages.
msg = []
msg << '='*40
msg << 'GameObjAddMore IS DEPRECATED, due to its existance causing Bigshot to behave badly for new users of that script'
msg << '(and inadvertently cause denial-of-service attacks against the repository)'
msg << 'Note the issue here is with Bigshot, NOT GameObjAddMore, but I am voluntarily removing GameObjAddMore from the repository'
msg << ''
msg << "Please migrate to my newer script, 'xmlpatch', which replaces both GameObjAdd and GameObjAddMore"
msg << ''
msg << " #{$lich_char}repository download xmlpatch.lic"
msg << " #{$lich_char}xmlpatch"
msg << '='*40
respond msg.join("\n")