Ajjwidjdneidjenw
-
Posts
161 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Posts posted by Ajjwidjdneidjenw
-
-
Here's a sample.
- script LevelRestriction -1,{ OnPCLoadMapEvent: if(.map$ == strcharinfo(3) && (BaseLevel >= .levelRestriction || readparam(bStr) >= .statRestriction || readparam(bAgi) >= .statRestriction || readparam(bVit) >= .statRestriction || readparam(bInt) >= .statRestriction || readparam(bDex) >= .statRestriction || readparam(bLuk) >= .statRestriction)) // Condition { dispbottom "You cannot warp to this map while your Base Level is over " + .levelRestriction - 1 + " or base stats are over " + .statRestriction -1; warp "SavePoint",0,0; // Warps player back to their savepoint } end; OnInit: .map$ = "Prontera";// Map you wish to block .levelRestriction = 100; // Level 100 and above .statRestriction = 100; // 100 stat and above // Load event setmapflag .map$,mf_loadevent; }
-
Haha, good point! I'll probably disable that later. Thanks!
-
-
It's not a source modification, but rather a script
Using the following in a script, you can teach a priest the skill Bowling bashif (BaseJob == Job_Priest) { skill "KN_BOWLINGBASH",<Level>,3; }
-
It's something that has been programmed in I wasn't aware about. I've tried it out, only to discover that it does change for me.
My sincerest apologies as for I am unable to reproduce your issue. The check in your code should work as how it is intended to be (No relog required). What version of rA are you running? -
Assuming the date is stored as a timetick:
if(gettimetick(2) > YOUR_VARIABLE_HOLDING_TIME) { mes "<Expiration message>"; close; }
If you need more support, kindly provide us with more information about the script (or the script itself)
-
In const.h add:
/** * THe maximum amount of damage a monster can do in Normal circumstances. (Ignoring GvG & BG maps) */ #define MAX_MONSTER_DAMAGE 2147483647
in battle.c
find (Battle_calc_damage)
if( sd ) { if( pc_ismadogear(sd) && rnd()%100 < 50 ) { short element = skill_get_ele(skill_id, skill_lv); if( !skill_id || element == -1 ) { //Take weapon's element struct status_data *sstatus = NULL; if( src->type == BL_PC && ((TBL_PC*)src)->bonus.arrow_ele ) element = ((TBL_PC*)src)->bonus.arrow_ele; else if( (sstatus = status_get_status_data(src)) ) { element = sstatus->rhw.ele; } } else if( element == -2 ) //Use enchantment's element element = status_get_attack_sc_element(src,status_get_sc(src)); else if( element == -3 ) //Use random element element = rnd()%ELE_ALL; if( element == ELE_FIRE || element == ELE_WATER ) pc_overheat(sd,element == ELE_FIRE ? 1 : -1); } }
add This below:
if (bl->type == BL_MOB && damage > MAX_MONSTER_DAMAGE) { return MAX_MONSTER_DAMAGE; }
I wasn't sure what you were asking. If this isn't what you're looking for, please elaborate.
-
You're not ending the script after The initialization of array ".ID". meaning the script falls through to the next command where player attachment is required:
Essentially:
Change:OnInit: setarray .ID,200001,200002;
To
OnInit: setarray .ID,200001,200002; end;
- 1
-
status.c
stat += level + status->agi + (bl->type == BL_MER ? 0 : bl->type == BL_PC ? status->luk / 5 : 0) + 100; //base level + ( every 1 agi = +1 flee ) + (every 5 luk = +1 flee) + 100
Thanks for the reference, I'll fix it.
Change:
stat += level + status->agi + (bl->type == BL_MER ? 0 : bl->type == BL_PC ? status->luk / 5 : 0) + 100; //base level + ( every 1 agi = +1 flee ) + (every 5 luk = +1 flee) + 100
To:
stat += level + (floor(status->agi/10)) + (bl->type == BL_MER ? 0 : bl->type == BL_PC ? status->luk / 5 : 0) + 100; //base level + ( every 10 agi = +1 flee ) + (every 5 luk = +1 flee) + 100
- 1
-
Change: battle.c
case MO_EXTREMITYFIST: skillratio += 100 * (7 + sstatus->sp / 10); skillratio = min(500000,skillratio); //We stop at roughly 50k SP for overflow protection break;
To:
case MO_EXTREMITYFIST: { int ratio = (100 * (7 + sstatus->sp / 10)); if (tsd->sc.data[SC_FREEZE]) { ratio /= 2; //Could also do the following: ratio *= 0.5 (50% reduction) 0.7 (30% reduction) etc. } skillratio += ratio; skillratio = min(500000, skillratio); //We stop at roughly 50k SP for overflow protection break; }
-
Though not completely impossible, it would require heavy client modification to be able to listen to the systems sound input, send it to the server, and receive it from the server. I suppose it would be too difficult to do it through the client
One other method is by creating a new program which can read the location of the character from the client (x,y,map) and then send it to the server, the server would then send it to the other clients that are in range of the xyz of your character.
-
rathena was down. Also I couldn't reproduce your issues, have you modified the script by chance?
-
Shouldn't have happened, I'll send you a PM. and I'll hepl you upcoming sunday
-
-
Hello!
I was looking through the src and stumbled upon this:#ifndef RENEWAL if( sc->data[SC_ASSUMPTIO] ) { if( map_flag_vs(bl->m) ) damage = (int64)damage*2/3; //Receive 66% damage else damage >>= 1; //Receive 50% damage } #endif
So why not divide the damage by 3, then multiply it by 2? this way a 64 bit int woulnd't be required.
#ifndef RENEWAL if( sc->data[SC_ASSUMPTIO] ) { if( map_flag_vs(bl->m) ) damage = damage/3*2; //Receive 66% damage else damage >>= 1; //Receive 50% damage } #endif
-
Same error? Make sure you change the other one as well.
//================Token Exchanger==== maintown,78,121,6 script Token Exchanger 713,{ mes "I can change your [^0000FFScared Token^000000] to [^0000FFHeroic Quest Token^000000]."; mes "1 Scared Token can be change for 15 Heroic Quest Token and Vise Versa"; next; switch(select("Sacred to Heroic Exchange:Heroic to Sacred Exchange")) { case 1: mes "1 Sacred Token(20001) = 15 Heroic Quest Token"; mes "How many Sacred tokens do you wish to exchange?"; input .@tokens; set .@a, (.@tokens*15); if (countitem(20001) < .@tokens) { mes "Sorry but you don't have enough tokens"; close; } else { delitem 20001,.@tokens; getitem 20000,.@a; close; } end; break; case 2: mes "15 Heroic Quest Token = 1 Sacred Token(20001)";\ next; mes "How many sacred tokens do you want?"; input .@tokens; set .@a, (15*.@tokens); if (countitem(20000) < .@a) { mes "Sorry but you don't have enough tokens"; close; } else { delitem 20000,.@a; getitem 20001,.@tokens; close; } end; } }
-
I stepped out of scripting for a while ,I'mback now. As soon as I re-install my test server I'll put some up. :-)
-
File Name: Bomb event
File Submitter: Jeroen
File Submitted: 05 Oct 2013
File Category: Games, Events, Quests
Content Author: Jeroen
//= Version: 1.6 Added Array for player + Rewards.
//= Version: 1.7 Optimised the script so its less resource intensive.(Received tips from Eurphy on rAthena, Thanks!)
//= Version: 1.8 Removed the use of 06guild_05, also started adding some new code for the next update.
//= Version: 1.9 Cleaned up the code a little bit.
//= Version: 2.0 Added a few more stuff to the config at the bottom, also did a bit more code cleaning.
//= Also added a GM Menu and other stuff(will have to expand the GM menu at some point).
//= Version: 2.1 Added a configurable map and added it to the GM menu.
-
//================Token Exchanger==== maintown,78,121,6 script Token Exchanger 713,{ mes "I can change your [^0000FFScared Token^000000] to [^0000FFHeroic Quest Token^000000]."; mes "1 Scared Token can be change for 15 Heroic Quest Token and Vise Versa"; next; switch(select("Sacred to Heroic Exchange:Heroic to Sacred Exchange")) { case 1: mes "1 Sacred Token(20001) = 15 Heroic Quest Token"; mes "How many Sacred tokens do you wish to exchange?"; input .@tokens; .@a = (.@tokens*15); if (countitem(20001) < .@tokens) { mes "Sorry but you don't have enough tokens"; close; } else { delitem 20001,.@tokens; getitem 20000,.@a; close; } end; break; case 2: mes "15 Heroic Quest Token = 1 Sacred Token(20001)";\ next; mes "How many sacred tokens do you want?"; input .@tokens; .@a = (15*.@tokens); if (countitem(20000) < .@a) { mes "Sorry but you don't have enough tokens"; close; } else { delitem 20000,.@a; getitem 20001,.@tokens; close; } end; } }
Been a while since I last did scripting for RO, mainly been coding in PHP and Java. This should do the trick, though you could clean up the code essentially you have to write this all down just once, as both script parts do the same thing.
Cheers!
-
Merely forgot to change the OnXEvent, I copied this from Euphy's script same goes for the dialogue .
-
- script PoringEvent -1,{ OnMinute00: monster "prontera",0,0,"--Ja--",.mobs[rand(getarraysize(.mobs))],1,strnpcinfo(3)+"::OnMobDead"; announce "A special poring has spawned in Prontera!",0; end; OnPoringDead: // announce strcharinfo(0)+" has killed the Poring!",0; getitem 7539,1; end; OnInit: setarray .mobs[0],1002,1003,1004; //etc. end; }
-
You're welcome!
Requesting a moderator to close this topic. -
Battle.c
change:case MO_EXTREMITYFIST: { //Overflow check. [Skotlex] unsigned int ratio = skillratio + 100*(8 + sstatus->sp/10); //You'd need something like 6K SP to reach this max, so should be fine for most purposes. if (ratio > 60000) ratio = 60000; //We leave some room here in case skillratio gets further increased. skillratio = (unsigned short)ratio; }
to:case MO_EXTREMITYFIST: { //Overflow check. [Skotlex] unsigned int ratio = skillratio + 100*(8 + sstatus->sp/10); //You'd need something like 6K SP to reach this max, so should be fine for most purposes. //if (ratio > 60000) ratio = 60000; //We leave some room here in case skillratio gets further increased. skillratio = /*(unsigned short)*/ratio; }
- 1
-
How do item effects work anyway? I mean they have to be refreshed by re-equiping everytime. Anyway here's a little work around
- script IDrop -1,{ OnNPCKillEvent: If(isequiped(.id)) if(!rand(.chance)) getitem (rand(2)? 908:909),1; end; //Config OnInit: set .id,1002; //Item ID of the item needed for the drop chance set .chance,5; //Chance of drop rate (2 = 1 in 2 (50%) 3 = 1 in 3 (33%), 4 = 1 in 4 (25%) etc. end; }
- 1
Deleting char_id on an array
in Scripting Support
Posted
Is .@size defined?
try
for(.@i=0; .@i < getarraysize(.char_id); .@i++) { if (.char_id[.@i] == getcharid(0)) deletearray .char_id[.@i],1; }