34 Commits

Author SHA1 Message Date
John Norman 4b01259424 Renamed class names and private/protected member variables. 2024-06-10 11:13:33 -07:00
joey a313868462 Support for pc-ids 2022-09-04 14:00:46 -04:00
joey 03454a1e69 - Support for globally saved buddylists
- Inform listserver which client versions can connect to the gserver to limit listserver spam
2022-03-09 19:54:10 -05:00
joey aa2b2b098f Added new script command:
- level.putexplosion(radius, x, y)
2021-03-08 11:52:39 -05:00
joey 645960596b Added new script commands:
- player.freezeplayer() - freezes the player, preventing them from movement
 - player.unfreezeplayer() - unfreeze player
2021-03-08 10:44:00 -05:00
joey 8224c5d4c9 NPC-Server changes:
- npc.setani(ani, params0, params1...)
 - npc.setcharani(ani, params0, params1...) - same as above
 - player.isstaff - true if the account is in the staff= serveroption
 - player.setani(ani, params0, params1...)
 - player.attached(npcId|npcObject)

Signed-off-by: joey <1166538+xtjoeytx@users.noreply.github.com>
2020-07-09 00:04:16 -04:00
joey 7ea900e611 Changes to gserver & npc-server
- Refactored the script timer out of TServer and into CScriptEngine
- Minor refactoring of some for-loops

NPC-Server changes:
 - fixed overflow when manipulating player.hearts
 - npc.scheduleevent(time, function, arg)
2020-04-10 12:40:45 -04:00
joey 0fbd9dcb68 Changes to npc-server:
- player.attachnpc(npc.id)
- player.detachnpc()
2019-06-13 00:26:40 -04:00
joey 3b9f90777d Changes to npcserver:
- npc.warpto(levelname, x, y)
2019-06-01 19:18:55 -04:00
joey 5e54b9f78b Changes to gserver:
- Potentially fixed an issue with unescaping '\' characters from the client. TBD

Changes to npc-server:
- player.sendpm("message")
- npc.setpm(function) - only works for the database npc named "Control-NPC", and each call to this function will override the previous function.
2019-06-01 15:54:37 -04:00
joey d94b248867 Changes to npc-server:
- Fixed an issue with setting player.guild to an empty string.
2019-06-01 00:11:31 -04:00
joey 060d43bc39 Changes to npc-server:
- level.issparringzone
- Fixed an issue with npc.save[] sending to players
- Tweaked the timer to be more accurate, and report better statistics.

Other changes:
- Changed around many files with the ScriptBinding's to try to separate it from being intertwined with the v8 implementation / gserver.
- Potentially fix segmentation fault on exit. V8 should now clean all constructors we bind too, should fix multiple-server support but it has not been tested.
2019-05-30 20:58:04 -04:00
joey 288b8ef07b Changes to npc-server:
- Implemented new properties on the npc and player objects.

New properties for the npc object:
- npc.bodyimg
- npc.headimg
- npc.horseimg
- npc.shieldimg
- npc.swordimg
- npc.height (read-only)
- npc.width (read-only)

New properties for the player object:
- player.bodyimg
- player.headimg
- player.glovepower
- player.guild
- player.mp
- player.platform
- player.shieldimg
- player.shieldpower
- player.swordimg
- player.swordpower
2019-05-29 01:38:17 -04:00
joey cee32097f2 Changes to npc-server:
- Global function tokenize(string, token = ' ') will split a string based on the token. (character only)
- Fixed an issue with comments on the last line of scripts breaking execution.
- Fixed an issue with the npc-controls triggering onPlayerLogout
- Fixed a crash when using npc.join() to join a class with compile errors
- Fixed npc.ani, it was returning the npcs chat message instead of the animation.
- Changing chat by npcs will no longer trigger playerchats on other npcs.

New functions for the level object:
- level.findnearestplayers(x, y)
- level.putnpc(x, y, script, options)

New functions for the npc object:
- npc.destroy() - only works on npcs from putnpc

New properties for the player object:
- player.ani
- player.ap
- player.bombs
- player.darts
2019-05-25 21:49:38 -04:00
joey 84a798df1f Minor changes
- Implemented savelog(filename, message)
- Fixed an issue with npc.attr[]/npc.save[] not sending persisted data for database npcs
2019-05-24 00:01:51 -04:00
joey b1fa887754 - Implemented npc.flags[flag]. These can only be accessed by the npc-server and will persist to disk.
- Persist npc.attr[] to disk for database npcs.
- Fixed npc.save[], and changed so it replicates graals functionality. Index starts at 0, and ends at 9.
- Fixed updating npc props to clients for npcs that were manipulated by other npcs.
- Fixed an issue with database npcs clientside scripts not being updated to the players.
- Fixed an issue with scripts manipulating player x/y triggering playertouchsme. Player must move for this to be triggered and can't be forced on a player
2019-05-23 22:24:32 -04:00
joey 5a6f6dc589 - Can add child objects such as attr/flags etc.. to a V8 wrapped object so it can properly dispose of their pointers.
- Fixed an issue with reference counting uninvoked actions

New script features:
- npc.blockagain();
- npc.dontblock();
- npc.drawoverplayer();
- npc.drawunderplayer();
- npc.hide();
- npc.show();
2019-05-23 17:06:54 -04:00
joey c791e96b86 Implemented player.setlevel2("levelname", x, y); 2019-05-23 13:21:57 -04:00
joey 4a6d3d0eb8 Implement player.say("message") and player.sendrpgmessage("message") 2019-05-23 13:21:57 -04:00
joey 50958760c3 Implemented server.timevar / server.timevar2 2019-05-23 13:21:57 -04:00
joey 9198b1758c Implemented player.level and player.levelname 2019-05-23 13:21:56 -04:00
joey 575252bc07 Implemented player.triggeraction(x, y, action, args..)
Changed server.findPlayer("account") to skip rc's.
2019-05-23 13:21:56 -04:00
joey 535b263fdd Merge remote-tracking branch 'origin/v8-npcserver-develop' into v8-npcserver 2019-05-12 17:56:58 -04:00
joey 7355f9b938 Support for classes, and the ability to join them to the player/npc objects. 2019-05-12 17:04:33 -04:00
joey 412a63fc83 Server object:
- server.findlevel("str") - returns a level object for the corresponding
 level. If it has not been loaded, the server will load it. May be useful.
 - server.players

Level object:
 - level.players - list of players in a level
2019-05-12 03:23:10 -04:00
joey 1f67c51a0e Changes to npc-server:
- Unique names are required for database npcs, and will be assigned incrementally if they collide with other npcs.
- server.findnpc(id/str) - returns the npc-object if the npc is found. Useful for database npcs

New events for database npcs:
  - onPlayerLogin(player)
  - onPlayerLogout(player)

Player object:
 - player.rupees
2019-05-12 02:33:32 -04:00
joey 6a307ef7de Okay, believe the last of the old npc-server stuff has been removed. 2019-05-11 17:01:52 -04:00
joey e852507403 Updated cmake files 2019-05-11 13:41:30 -04:00
joey c949da48c4 Changes to npc-server:
- Fixed server.npcs, now properly returns an array of npcs on the server. Make sure to cache it for use in loops etc.. each reference rebuilds this array on the fly.
- Untested move() function, may work.

Level object:
- level.findareanpcs(x, y, width, height)
- level.npcs

Npc object:
- npc.move(dx, dy, time, options)
2019-05-10 16:47:02 -04:00
joey 4fc70b74bf Changes to npc-server:
- Added a level object

NPC object:
- npc.level - access the level object
- npc.levelname - level name as string

Level object:
- level.name - level name as string
2019-05-09 17:54:41 -04:00
joey a2267387f7 Changes to npc-server:
- Can iterate through server.npcs - *may not stay*
2019-05-09 10:22:51 -04:00
joey 97d7b422a4 GServer Changes:
- Changed the timer from time() to use chrono
- Added a flag to npc props which allows forwarding the changes to the client (used for the npcserver)

NPCServer Changes:
- Giant dump of changes, including level npc support.
2019-04-28 14:11:30 -04:00
jfichera91@gmail.com b2acb5a8da 2013-05-12 13:58:15 +00:00
loneboco f6ea8dee2d Changed some comments and altered a warning message.
Added a document that contains NPC-Server information for people trying to build an NPC-Server.
2011-10-21 07:22:21 +00:00