Commit graph

29 commits

Author SHA1 Message Date
turleypol
0aea78c405 added array.sorted_insert to insert into an already sorted array.
Added a few finals and defaults
2018-10-07 21:05:02 +02:00
Gabriele Tozzi
b72f725e02 Whitespace fixes 2018-04-03 04:13:03 +02:00
turleypol
0d04d5e19b Current FunctionRef status. Mixed with a few more cmake stuff 2018-02-03 19:05:22 +01:00
turleypol
dbb25bdb62
Include and buildsystem cleanup (#45)
Include cleanup
Reworked buildsystem (Linux only)
Removed dynamic libs, Linux now again uses static linking (like windows)
2018-01-29 21:55:48 +01:00
turley
189cad3479 Formating everything
Authors are not forced to use the clang-format setting, but should
atleast be inspired by the style.
The only thing which is now not allowed are tabs for ident/alignment!
2016-02-19 19:26:35 +01:00
Gabriele Tozzi
d1ac902926 Documentation: reformatted headers for DoxyGen 2016-01-28 14:52:40 +01:00
Gabriele Tozzi
7593188ff7 Merge branch 'master' into cmake 2015-12-05 09:17:28 +01:00
Gabriele Tozzi
05b2a3a6bc Buff Bar Support
The buff status is held in a new buffs_ property of Character. It is
modified via Character.addBuff(), Character.delBuff(),
Character.clearBuffs() functions. (Maybe also a readBuffs() function
could be useful in future?). Packets are automatically sent when on
a "when needed" basis.
2015-12-05 09:06:40 +01:00
Thomas Volkert
0a0d1974a8 Fixed Windows build for clib 2015-11-11 00:34:18 +01:00
turley
c755d44e75 Added: array.cycle([count])
will move array backwards or forwards in-place as it were a conveyor belt.
{1, 2, 3}.cycle()
Will make it:
{3, 1, 2}
Accepts a negative value as a shift to move different direction
Changed: string.format()
Now actually faster than string concatenation in eScript
Fixes a bug where {:d} formating could cause an arbitrary number shown instead of a real value
tag errors are slightly more intuitive and compact.
Note: Patches submitted by andenixa
2015-07-27 19:17:49 +02:00
turley
79dff37246 Splitted gamestate external. 2015-01-02 14:46:44 +01:00
turley
99d7dc3037 namespaces...finally :)
Hard part is finished every file is touched. Namespaces are currently rough named by directory name.
Maybe we could split it more
2013-12-21 09:10:46 +00:00
dsourc
ad5b5ddffa Added: character.DisableSkillsFor( duration ) method to disable skills that are started with start_skill_script or by scritps defined in attributes.cfg for duration ( seconds )
This method overrides the default Delay setting in attributes.cfg if used ( for example if on failing a skill you want no delay just set it to 0 )
             This can also be used to disable skills for example during an event or pvp
    Added:   item.name_suffix for adding crafter marks or such
             item.desc returns the formatted name and suffix added to it without formatting if it exists
             item.name does not include this suffix, so that can be used to get the item name without formatting and without suffix
2013-09-25 18:43:43 +00:00
frozenblit
4fed077538 Added string formatter from andenixa. Missing: write tests!
(http://forums.polserver.com/viewtopic.php?f=41&t=5078)
2013-08-27 22:11:09 +00:00
turley
3a37cd1006 Added: string methods:
str.length() : returns like len(str) the length of the string
str.upper() : returns like upper(str) the uppercase version and also modifies the str
str.lower() : returns like lower(str) the lowercase version and also modifies the str
str.find(Search,[Start]) : returns like Find(string, search, start) the index of the first occurance of 'search' after 'start' within str
but unlike the basic.em function the Start parameter is optional if not given it searches the whole string
str.join(array) : returns a string which is the concatenation of the array elements, seperated by str
2012-11-16 16:27:26 +00:00
dsourc
0b49173a9c Changed: MoveItemToContainer( item, container, x := -1, y := -1 ); to MoveItemToContainer( item, container, x := -1, y := -1, add_to_existing_stack := 0 );
Changed:    item.SplitStackInto( container, amount ) to item.SplitStackInto( container, amount, add_to_existing_stack := 0 )
  Note:       The optional add_to_existing_stack parameter defines if the items moved to the container will look for an existing stack and add to it or just add as a new item ( old behaviour )
              If add_to_existing_stack == 1 and there is no stack in the container, it will return Error "There is no existing stack", so its up to scripts to check this.
  Added:      item.HasExistingStack( container ) to allow scripts to check if there is an existing stack in a container or not, returns the ItemRef of the stack if it exists.
2012-08-27 11:06:41 +00:00
turley
9677a77c2c added XmlNode.clonenode()
since all NodeObjects get destroyed when the corresponding XmlFileObject is destroyed, use this method to store a Node for later use.
2012-01-02 13:44:52 +00:00
turley
c9cabbf9a2 Added: DestroyMulti(house) returns error "House currently being customized."
Added: house.cancelediting(chr, drop_changes) will stop editing mode.
drop_changes 1/0 if true drops all non committed changes
Errors: "House is not custom","House is currently not been edited","Character is not editing this house"
Added: Syshook CloseCustomHouse(mobile, house)
called after client quits editing, or when house.cancelediting() is called
return value is ignored
Added: servspecopt.cfg
"SpeedHack_MountRunDelay"  default 80 ms
"SpeedHack_MountWalkDelay" default 180 ms
"SpeedHack_FootRunDelay"   default 180 ms
"SpeedHack_FootWalkDelay"  default 380 ms
Change them on your own risk
2011-09-03 08:15:59 +00:00
AustinHeilman
235a204b46 Changed merchants to send a .shopping list with EVID_MERCHANT_SOLD containing an array of structs .item and .amount (script is responsible for breaking up stacks) - Scripts will be responsible for gold checks, etc when something is purchased.
Added item.SplitStackInto(container, amt) - Returns a reference to the new item stack or errors. Have spot for item.SplitStackAt(x, y, z, real, amt) next.
2011-08-09 00:02:14 +00:00
turley
11bd865d23 removed syshook and replaced it with a noncritical call of scripts/misc/customhousecommit.ecl 2011-05-28 06:29:43 +00:00
turley
7c44ca6613 added:
multi.house_parts
multi.house_editing
who.house_editing
multi.addhousepart(graphic,xoff,yoff,z)
multi.erasehousepart(graphic,xoff,yoff,z)
components get added to workingdesign during edit
2011-05-21 09:14:42 +00:00
turley
5470c07893 finished xml reading/writing 2010-09-06 12:35:46 +00:00
turley
161ec8c190 started xml file parsing/writing
currently only parsing works
2010-08-25 11:53:14 +00:00
turley
bd7c8e2189 more vartype cleanup
Added: (Tomi) chr priv "runwhilestealth" you can run while you are in stealth for as many stealthsteps you have
Added: (Tomi) new npcdesc entry "SaveOnExit" 0/1 ( defaults to 1 )
Note: this also means that SaveOnExit can be definied in the override_properties struct
Changed: vitals::ApplyDamage( mobile, damage, userepsys := DAMAGE_USE_REPSYS, send_damage := DAMAGE_USE_DEFAULT )
            vitals::ApplyRawDamage( character, hits, userepsys := DAMAGE_USE_REPSYS, send_damage := DAMAGE_USE_DEFAULT )
            const DAMAGE_NO_SHOW := 0;
            const DAMAGE_SHOW := 1;
            const DAMAGE_USE_DEFAULT := 2;
            DAMAGE_USE_DEFAULT uses the SendDamagePacket setting from combat.cfg (Tomi)
Added: uo::SendOverallSeason( season_id, playsound := 1 )
            Used to send the Season packet 0xBC to all clients logged on.
            This function doesnt resend the lightlevel or weather after it sends season, that has to be done by scripts.
            chr.setseason( season_id, playsound )
            Used to send the Season packet 0xBC to a single character.
            This method doesnt resend the lightlevel or weather after it sends season, that has to be done by scripts.
            (Tomi)
Changed: (Tomi) uo::SpeakPowerWords( who, spellid, font := _DEFAULT_TEXT_FONT, color := _DEFAULT_TEXT_COLOR) 
            font, color like every speech function
2010-01-15 09:55:20 +00:00
turley
e487c74e87 deafened not deafed 2009-10-14 10:24:18 +00:00
turley
5519dc9c0e Added: char.deaf(duration) - duration in seconds. -1=forever, 0=off
Added: char.deafed r/o
2009-10-14 10:11:14 +00:00
turley
4bf7f8f3e1 Added spellbook.addspell() & .removespell() methods 2009-10-10 08:26:56 +00:00
turley
aa73f9422c Added spellbook.spells() & .hasspell() methods 2009-10-09 08:27:15 +00:00
muaddib_pol
d032ee448f + POL is now, open source. 2009-09-03 19:44:42 +00:00