312 Commits

Author SHA1 Message Date
skotlex
6bbec4a65d - Added an answer to a FlavioJS's comment, and added a question myself (npc.c/script.c respectively)
- Fixed add_str in script.h not being updated to const char as well. But why do we really need such a script-engine low-level function exposed to the rest of files? :/
- Moved the strip unequip code to before deleting the timer, this fixes trying to "re-strip" someone causing the skill to fail and on top of that terminate their current strip effect.
- Added an ugly work around to the issue of skills with additional effect causing opt1 status when they have just terminated them (in short, you shouldn't be able to hit someone with, say, sleep, and then have the same skill cause them stun, since both are opt1 values).
- Reading of TK Mission variables will now happen if you are a TK-class character regardless of whether you know TK_MISSION or not. Should fix being able to reset skills to reset your Mission data.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9537 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-20 15:54:11 +00:00
FlavioJS
72bebf27fc - Now root script functions calls can have parenthesis (will take any parenthesis after the function as the start of the argument list).
This means "func (exp),exp;" isn't valid anymore and has to be changed to "func exp,exp;" or "func((exp),exp);" or something like that.
- Updated swordman.txt and knight.txt accordingly.

Only changed this because it was very annoying when I was creating the sample localized npc.
Don't expect more changes unless something similar happens again. Bottom line: we're in soft feature freeze and moving to eApp...

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9536 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-20 11:50:44 +00:00
FlavioJS
78b52bbb4b - Replaced our fix for "mes ();" crashing by jA's version. see trunk[8867] and stable[8927]
- Merged the fix for & having the same precedence as << and >> from jA.
- Merged the C_OP3 operator from jA: test ? if_true : if_false

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9533 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-20 09:09:21 +00:00
FlavioJS
40b389bc42 - Changed the script source from unsigned char* to const char*.
- Updated plugins Makefile.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9532 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-20 07:17:18 +00:00
skotlex
e445c551c2 - Fixed SC_STRIPWEAPON failing on two-handed weapons.
- Minor changes.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9529 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-20 00:44:52 +00:00
skotlex
b19f78a17c - Fixed the setting hom_setting not being read at all.
- Minor cleanups


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9525 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-19 20:33:35 +00:00
skotlex
b8a2a5f905 - Added function skill_strip to handle stripping code. The RG strip skills and GS_DISARM use it now.
- Modified the strip-related status changes so they handle removing the equipped item instead of leaving it up to the skill-code. They return 0 when nothing could be stripped.
- Cleaned some the MD_DETECTOR code.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9499 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-14 18:15:24 +00:00
skotlex
84f8ec45d5 - Modified the skill damage packet and the knockback packets to mimic aegis sent packets for such skills.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9471 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-12 14:53:53 +00:00
toms
912fc7a427 Fixed npc commands atcommand & charcommand not working with a custom command_symbol
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9431 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-07 12:55:00 +00:00
FlavioJS
6fda364348 - Moved START_ACCOUNT_NUM and END_ACCOUNT_NUM from login.h to mmo.h and changed clif_guess_PacketVer to use that.
- Made the script engine big-endian compatible. (i know it's pointless because of the move to eApp, but just couldn't resist :S)
- Commented out the remnants of ladmin packet parsing in map-server.
- Added a warning when a player has an invalid packet version (shouldn't happen)

PS- also added info on clif_guild_basicinfo packet fields, if anyone is interested

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9408 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-05 07:24:29 +00:00
skotlex
1424d93e12 - Repairing items via scripts no longer displays "item has been repaired"
- Status Recovery again makes mobs unlock their current target.
- Moved requesting party/guilds from the char-server from pc_authok to pc_reg_received, since map_nick2sd and map_getallsd won't work until the characters are authentified. Also removed the guild master setting from clif_parse_LoadEndAck to pc_reg_received since guild master setting will work there.
- Fixed homun hunger timer being started on login even when hom is vaporized/dead.
- Fixed mvp exp attacker bonus applying incorrectly.
- Removed duplicate msg_athena.conf entries 619 and 620 for Ninja/Gunslinger.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9401 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-04 15:37:09 +00:00
skotlex
231f495291 - Removed sd->sex since it's redundant (we can always use sd->status.sex)
- If somehow a player logs out and it's saved with 0 hp, on login his state will be set to dead as well so he can respawn (otherwise that leads to a stuck char)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9398 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-03 19:46:43 +00:00
Lance
e82fd31056 * Added buildin_checkvending and buildin_checkchatting.
modified   Changelog-Trunk.txt
modified   src/map/script.c


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9395 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-03 09:37:36 +00:00
skotlex
8e68089e85 - Fixed passive mobs becoming increasingly unlikely to retaliate to attacks after they got inflicted by a disabling status change.
- Changed the "is_boss" define to check for mode MD_BOSS instead of giving mvp exp.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9384 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-02 01:49:27 +00:00
skotlex
2de8486627 - Fixed txt-converter compilation.
- Added my_global.h include to login converter
- Removed sd->char_id since we can use sd->status.char_id instead.
- Small speedup in STRECOVERY, and made it not unlock a mob's target.
- Fixed GS_GROUNDDRIFT consuming ammo when it's time expires (so it was consuming 2 grenades instead of one). Also added a "explosion effect" when their time runs out.
- gvg_dungeon mapflag won't set pvp related mapflags anymore, pc_dead will force pvp ranking gain/loss on gvg_dungeon maps now.
- Now when coming out of hiding land-effects will trigger on the character.
- Made the pc_setpos message when being placed on an unwalkable tile tell you which player triggered it.
- Fixed land effects not taking effect inmediately on map-load when the invincible timer is disabled.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9374 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-01 17:17:09 +00:00
Lance
b59e7b8596 Minor tweak in
modified   src/map/script.c


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9373 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-01 04:06:18 +00:00
skotlex
b421d38216 - Added overflow protection to @main whisper parsing.
- Fixed a bug in slaves_inherit_speed
- Miscellanous silly cleanups (format, unnecessary assignments, comments, etc)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9367 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-29 20:11:12 +00:00
skotlex
964ede96d5 - Fixed uninitialized variable fd being used in WFIFOHEAD in a few clif functions.
- Some cleaning in the script.c functions that invoke the clif functions to make sure a null sd is never passed.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9308 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-24 13:53:21 +00:00
Lance
05b2d83b43 * Completed Reddozen's hanging mapwarp code to support party and old syntax.
modified   Changelog-Trunk.txt
modified   src/map/script.c


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9305 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-24 05:25:01 +00:00
Lance
9b4d416b15 git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9269 54d463be-8e91-2dee-dedb-b68131a5f0ec 2006-11-20 12:43:39 +00:00
Lance
11e7a6e143 - atcommand and charcommand backwards compatibility
modified   src/map/script.c


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9268 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-20 12:39:27 +00:00
Lance
d4e444ebd4 - Removed security check since source level patch is applied. Reverted select(), created prompt().
modified   Changelog-Trunk.txt
modified   npc/airports/airships.txt
modified   npc/cities/amatsu.txt
modified   npc/cities/gonryun.txt
modified   npc/cities/hugel.txt
modified   npc/cities/lighthalzen.txt
modified   npc/cities/niflheim.txt
modified   npc/cities/valkyrie.txt
modified   npc/custom/eAAC_Scripts/disguiser.txt
modified   npc/custom/eAAC_Scripts/quest_warper.txt
modified   npc/custom/jobs/jobmaster.txt
modified   npc/events/idul_fitri.txt
modified   npc/jobs/1-1e/gunslinger.txt
modified   npc/jobs/1-1e/ninja.txt
modified   npc/jobs/novice/novice.txt
modified   npc/merchants/kunai_maker.txt
modified   npc/merchants/novice_exchange.txt
modified   npc/merchants/refine.txt
modified   npc/other/comodo_gambling.txt
modified   npc/other/dts_warper.txt
modified   npc/other/marriage.txt
modified   npc/other/powernpc.txt
modified   npc/quests/Lvl4_weapon_quest.txt
modified   npc/quests/gunslinger_quests.txt
modified   npc/quests/quests_ein.txt
modified   npc/quests/quests_umbala.txt
modified   npc/sample/monster_controller.cpp
modified   src/map/script.c



git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9267 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-20 10:11:20 +00:00
Lance
22de482fce * Hack protection from packet monkeys in clif_parse_NpcSelectMenu.
modified   Changelog-Trunk.txt
modified   src/map/clif.c
modified   src/map/map.h
modified   src/map/script.c



git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9261 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-19 06:08:49 +00:00
Lance
97919b1a6f * Added 'cancel' button parsing in buildin_select menu system. Now scripts will continue to load if 'cancel' is pressed and 255 will be returned.
modified   Changelog-Trunk.txt
modified   notice.txt
modified   src/map/script.c


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9258 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-19 04:15:32 +00:00
Lance
3bfc48996a * Fixed potential crash in IRC processing message with '%' using *printf.
* Fixed memory leaking caused by homun_data not freed when removed.

* Minor adjustments to sign/unsign in script commands.

modified   Changelog-Trunk.txt
modified   src/map/irc.c
modified   src/map/script.c
modified   src/map/unit.c


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-17 16:48:04 +00:00
Lance
3e7a154f59 * Edited atcommand and charcommand syntax. Now it doesn't need the useless character name and ":".
modified   Changelog-Trunk.txt
modified   src/map/atcommand.c
modified   src/map/atcommand.h
modified   src/map/charcommand.c
modified   src/map/charcommand.h
modified   src/map/clif.c
modified   src/map/map.c
modified   src/map/script.c


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9230 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-16 15:26:27 +00:00
skotlex
c97cbb77c4 - Characters with Karma may fight amongst them anywhere.
- Added mapflags partylock and guildlock, which lock the state of the parties/guilds on said maps. partylock blocks user party requests to create/invite/leave/kick, while guildlock blocks user guild requests to create/invite/leave/expel/make alliance/make opposition/delete alliance/delete opposition/break


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9216 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-14 14:21:47 +00:00
skotlex
5166b75157 - Fixed some line delimiter issues in script.c
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9196 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-10 22:47:08 +00:00
skotlex
cd482bed77 - Fixed map_foreachiddb and map_foreachpc so they don't encapsulate the variable arguments into a double va_arg list. Thanks to the Ultra Mage for the tip.
- Cleaned up the clif_hate/mob_info functions with the correct fields/usage as explained by Rayce.
- Implemented clif_feel_hate_reset packet to properly display the Angel of the Sun/Moon/Stars, thanks again to Rayce for the relevant information.
- LP will again block all land-stuff from being placed down on top of it for the exception of Song/Dance/Encores.



git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9162 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-07 16:17:01 +00:00
skotlex
eee1baf718 - Ganbantein's delay is now 2 secs.
- Removed the time2 value of NJ_NEN since it has no use.
- Removed the return code entry when logging GM reload-GM requests (login-sql),it'll just be stored as zero.
- Added a fix on socket.c to not pick INADDR_ANY when choosing our own IP.
- Applied the correction on maprespawnguildid so that it parses ALL players and not just those on a map.
- TK_JUMPKICK now dispels normal aspd/speed potions (not berserk pitched ones) and Preserve will be unable to block this.
- Soul Linkers are now inmune to SA_DISPEL
- You can now place everything (except magic skills) on top of LPs.
- Corrected Ganbantein to not touch song/dance/ensembles.
- Status_calc_pc will refuse to execute if the player is still tagged as a "new connection" and the invocation is not meant to be the first one.
- Swapped the order of checks in status_isimmune so that Wand of Hermod skill blocking takes precedence over GTB's
- Client packets will all be ignored while a player is not on a map until the LoadEndAck packet is received.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9152 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-06 15:58:30 +00:00
Lance
29dc8ea873 * Reverted changes, moved status_calc_pc(sd,1) back to pc_authok since it causes problems.
modified   Changelog-Trunk.txt
modified   src/map/pc.c
modified   src/map/script.c


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9150 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-06 05:01:41 +00:00
reddozen
da883b0bb0 a couple new script commands [Reddozen]
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9136 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-11-04 21:40:16 +00:00
Lupus
f7442ef2b3 Fixed getcharid according to samples and docs
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9098 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-30 12:28:23 +00:00
skotlex
a78eb50f08 - Removed NJ_TOBIDOUGU adding damage to W_HUUMA weapons which somehow got readded.
- When nonplayers use Cloaking, it will be forced to level 10 since mobs shouldn't have movement/attack restrictions while walking cloaked.
- Should fix a warning in int_homun.c


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9043 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-23 13:57:54 +00:00
skotlex
1107b381bd - Fixed Charge Atk being able to go through chasm/pits.
- Moved the homunculus DB information from the player structure to the homun structure. Modified the homunculus creation packets to hold this information during creation, also, all initial values are handled by the map-server, the char server only assigns it a homun ID.
- Removed target_id/attacked_id from homun_data as it wasn't really used.
- Codes cleanup (removing of commented code mostly)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9031 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-20 18:30:05 +00:00
skotlex
2b44fd5db4 - Cleaned up the log.c file.
- Splitted log_pick into log_pick_pc and log_pick_mob to avoid ugly type-casting.
- Fixed log_chat not recording anything if the server is compiled in SQL mode and sql_logs is turned off (it should then record to a plain txt file)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9017 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-19 21:25:56 +00:00
skotlex
ddc6b5e07b - Cleaned up unitattack, unittalk and unitdeadsit
- Updated status_get_name to take into account fakename, also cleaned it up.
- Cleaned up the char-server code when the last point of a player is not found. First it'll check if there's any mapserver online, and then, if there is, it'll look for the major cities. If this fails, then the player will be told server is closed instead of trying to send him to a "random map".


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8967 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-11 19:49:55 +00:00
skotlex
231c36a9c7 - Should have fixed being petrified not reducing your defense and increaseing your mdef.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8958 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-10 16:44:59 +00:00
skotlex
7c8ec5366e - Reverted declaration of run_script to normal since it appears there's no longer any memory leaks related to it.
- Returned the MAX_PC_BONUS value to 10.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8928 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-03 16:19:14 +00:00
skotlex
55cf6d9d0f - Renamed nopenalty mapflag to noexppenalty. Using nopenalty will turn on/off both noexppenalty and nozenypenalty now.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8915 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-10-02 14:19:56 +00:00
skotlex
42375e1896 - Rewrote the txt->sql converter. It now links directly to the char server files so that it should get auto-updated with any code changes in the later.
- The converter will now also convert: account-wide variables, parties, guilds, guild storage and guild castles. At this point the only two things not converted are login-server-wide account variables (##, they belong to the login converter) and homunculus (the SQL save function is messy and doesn't lends itself to be integrated with the converter the way all the other functions are).
- Modified the char servers so they are compatible with the converter, the define TXT_SQL_CONVERT identifies sections unique to each char-server mode (this would had been a hella lot easier if both char servers where the same code-base instead of duplicated code <.<)
- Updated the Makefiles as per the new compiling requirements for the converter.
- misceffect2 will no longer cause the effect on top of the source object when it is the fake npc.
- Added check so that Frost Nova doesn't hides hitting animation on targets.
- Added the missing brackets around the trade logs condition check, thanks to Coltaro.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8908 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-30 21:54:01 +00:00
skotlex
f7a1d44c3e - Merged the necessary changes to make the script engine support negative constants (db/const.txt). Thanks to Rayce (from jA) for the code.
- Cleaned up the skill.c code to take into account when skill_unitsetting returns null (skill failed), fixes a possible crash with Wand of Hermode


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8891 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-28 13:26:40 +00:00
skotlex
1bdee644f1 - Merged FlavioJS's script patch which should fix stuff like "mes ();" causing crashes.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8867 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-25 20:47:07 +00:00
skotlex
3218162748 - Fixed a bug on "select" when skipping empty entries when the selected entry is the last.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8839 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-22 01:02:46 +00:00
skotlex
2beeeee85c - Added support for skipping empty string menu entries for the select() command (just as menu has it already)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8816 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-19 23:06:42 +00:00
skotlex
c86c748d9d - Corrected undisguise not working if you don't pass any parameters to it (which is how it should be)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8814 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-19 19:06:19 +00:00
skotlex
6630ebff98 - Made the report_Src function also report name of non-bl objects.
- The double continuation error will now display both scripts that triggered it.
- Loading the storage from the char-server will fail if player is already tagged in final save state.
- Removed setting ban_spoof_namer, sending invalid global-talk packets will now just kick the player out of the server.
- Added BL_NPC support to status_get_name


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8812 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-19 17:23:22 +00:00
skotlex
84f86fa96e - Modified the nocommand mapflag so you can specify the GM range that is blocked from using commands (eg: "prontera.gat mapflag nocommand 40" disables commands to characters in the GM range 0~39)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8733 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-13 16:11:22 +00:00
Lupus
59e39f1b71 git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8698 54d463be-8e91-2dee-dedb-b68131a5f0ec 2006-09-11 05:01:48 +00:00
skotlex
4e9c745bdf - Corrected SC_INTRAVISION not starting.
- Small cleanups (line terminators, indenting)
- Fixed crash when attempting to read a Label as a string on a script (thanks to End of Exam)
- Fixed possible crash when changing a chat-room's owner (thanks to End of Exam)


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8639 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-09-05 19:49:38 +00:00