-
Posts
2,407 -
Joined
-
Last visited
-
Days Won
49
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Capuche
-
Maybe https://github.com/rathena/rathena/commit/9c46f3e6ba288c71f098b12834ea25779eadbc0e
-
NPC not checking zeny or taking zeny correctly.
Capuche replied to Rallycart's question in Scripting Support
Double check the typo of your variables. For example the amount variable name change in input [email protected]; [email protected] = .amountbath*1000; -
You can update your src files manually from the commit https://github.com/rathena/rathena/commit/a5afb069796cc8117a00822617061332ecd2cf8c For example in StringBuf_Init(&sbuf); StringBuf_Printf(&sbuf, "%s", message); - clif_disp_overhead(bl, StringBuf_Value(&sbuf)); + clif_disp_overhead_(bl, StringBuf_Value(&sbuf), target); StringBuf_Destroy(&sbuf); } - remove the line + add the line
-
Search in the forum.
-
Untested getpartymember getcharid(1),1; getpartymember getcharid(1),2; for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) if (isloggedin( [email protected][[email protected]], [email protected][[email protected]] ) == 0) continue; [email protected] = readparam( Class, [email protected][[email protected]] ); if (compare( [email protected]_list$, "|" + [email protected] + "|" ) == 1) { mes "Sorry, only one " + jobname([email protected]) + " is allowed."; close; } [email protected]_list$ += "|" + [email protected] + "|"; } EDIT : should still work
-
Please read
-
npctalk script command was updated when we released lasagna script. https://github.com/rathena/rathena/commit/a5afb069796cc8117a00822617061332ecd2cf8c Did you update your emulator? No you didn't. How to solve the issue? Update your emulator. Will I help you to update it? No I won't. There is lot of topic about it.
-
Untested // instance_db.txt // 100,Bossnia,1800,1800,guild_vs2,0,0 prontera,154,187,5 script test5 100,{ [email protected]_id = getcharid(1); [email protected]_name$ = getpartyname([email protected]_id); [email protected]_name$ = "Bossnia"; if (!instance_check_party([email protected]_id)) { mes "Why don't you make a party with more than 1 person and talk to me again?"; close; } if (getcharid(0) == getpartyleader([email protected]_id,2)) [email protected]$ = "Generate Instance"; switch( select( [email protected]$, "Enter " + [email protected]_name$ + "", "Cancel" ) ) { case 1: switch( instance_create([email protected]_name$) ) { case -3: dispbottom "Memorial Dungeon, '" + [email protected]_name$ + "' is already in progress.",0xFFFFFF; end; case -4: case -2: case -1: mes "Party Name: " + [email protected]_name$; mes "Party Leader: " + strcharinfo(0); mes "^0000ff" + [email protected]_name$ + "^000000 - time gap generation failed."; close; } end; case 2: switch( instance_enter([email protected]_name$) ) { case IE_OTHER: mes "An unknown error has occurred."; close; case IE_NOINSTANCE: mes "The time gap is not yet open."; close; case IE_NOMEMBER: mes "Your body is not fit to enter the time gap. You won't be able to get in if you're not in a party."; close; case IE_OK: mapannounce strnpcinfo(4), [email protected]_name$ + " party member " + strcharinfo(0) + " enters " + [email protected]_name$ + "",bc_map,"0x00ff99"; end; } case 3: end; } } The script create an instance attached to the party. All party member can enter.
-
Post a screenshot of your mapserv errors here.
-
Count players on specific map coordinates?
Capuche replied to RedMonkey's question in Scripting Support
*getareausers("<map name>",<x1>,<y1>,<x2>,<y2>) This function will return the count of connected characters which are located within the specified area - an x1/y1-x2/y2 square on the specified map. This is useful for maps that are split into many buildings, such as all the "*_in" maps, due to all the shops and houses. -
Replace sd = script_rid2sd(st); by sd = map_id2sd(st->rid);
-
setarray .ID[0],501,502,503,504,505; setarray .AM[0],1,2,3,4,5; for ( [email protected] = 0; [email protected] < 5; [email protected]++ ) { if (countitem(.ID[[email protected]]) < .AM[[email protected]]) [email protected]$ += (.AM[[email protected]] - countitem(.ID[[email protected]])) + " x " + getitemname(.ID[[email protected]]) + "\n"; } if ([email protected]$ != "") { mes "You are missing the following items:"; mes [email protected]$; close; }
-
if (strcharinfo(3) == "prontera") mes "you're already at prontera"; else if (strcharinfo(3) == "payon") mes "you're already at payon"; else if (strcharinfo(3) == "aldebaran" || strcharinfo(3) == "geffen" || strcharinfo(3) == "yuno") mes "you're already at aldebaran or geffen or yuno";
-
Update it from https://github.com/rathena/rathena
-
If I say no, would you REALLY believe me? Ofc it's outdated, the folder doesn't have lasagna script.
-
Did you update your emulator?
-
Have you considered to update your source files?
-
No it's not.
-
getequipcardid checks the card in your equipment slot and return 0 if nothing equipped See getequipisequiped
-
Punching bag sometimes disappears
Capuche replied to kyleanthonydizon's question in Scripting Support
With a permanent spawn the mob should respawn (5 secs delay) prontera,136,171 monster Punching Bag 1905,1,5000,0,"Punching Bag::OnDummyKill" -
hmm I don't get the npc->checknear warning on test server.
-
Like this? (untested) //Charity NPC// //Ryonin// izlude,124,139,6 script Lucy 101,{ function Display_Timer; // define function if ($totaldonate >= 75000000) end; // Variables set [email protected]$, "[Lucy]"; setarray [email protected]_Zeny[0], 5000000, 10000000, 15000000, 25000000; // Zeny Detector if (Zeny < [email protected]_Zeny[0]) { mes [email protected]$; mes "Sorry, you dont have enough money to talk to me."; mes "You need to have atleast ^FF00005,000,000z^000000."; mes "The total amount I collected is : ^0000CD[" + $totaldonate + "]^000000 Zeny."; // '$' for permanent server variable close; // don't need end after close } // Start mes [email protected]$; mes "Hello, Citizen of Ragnarok Offline."; mes "Can I help you with something?"; next; if (select("Yes, I would like to donate:No, Thank you") == 1) { mes [email protected]$; mes "Okay then. See you later."; close; } mes [email protected]$; mes "I was assigned by the ^DAA520 GM Team^000000 to collect the donation money."; mes "The total amount I collected is : ^0000CD[" + $totaldonate + "]^000000 Zeny."; next; mes [email protected]$; mes "You can only donate 1,000,000z or 5,000,000z.";// different from menu next; mes [email protected]$; mes "If I collected a total amount of ^FF000075,000,000^000000z."; mes "I can activate this event:"; mes "Event: ^8B008BComodo Hat Festival Quest^000000."; mes "Event Duration: ^006400[2 DAYS]^000000."; next; mes [email protected]$; mes "How much money you want to donate?"; mes "Once you donate, I can't your money back."; next; [email protected] = getarraysize( [email protected]_Zeny ); for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ ) [email protected]$ += callfunc( "F_InsertComma", [email protected]_Zeny[[email protected]] ) + ":"; // dynamical menu [email protected] = select([email protected]$) - 1; if ($totaldonate >= 75000000) { // already on mes [email protected]$; mes "The total amount I collected is : ^0000CD[" + $totaldonate + "]^000000 Zeny."; close; } if (Zeny < [email protected]_Zeny[[email protected]]) { // re-check player zeny amount mes [email protected]$; mes "Sorry, you dont have enough money to talk to me."; mes "You need to have atleast ^FF00005,000,000z^000000."; mes "The total amount I collected is : ^0000CD[" + $totaldonate + "]^000000 Zeny."; close; } set Zeny, Zeny - [email protected]_Zeny[[email protected]]; set $totaldonate, $totaldonate + [email protected]_Zeny[[email protected]]; mes [email protected]$; mes "Thank you for donating " + callfunc( "F_InsertComma", [email protected]_Zeny[[email protected]] ) + "z!"; mes "We appreciate your generosity."; announce "[Charity Lucy: "+strcharinfo(0)+"] has donated [" + callfunc( "F_InsertComma", [email protected]_Zeny[[email protected]] ) + "z] to Charity! We appreciate your generosity.",0; if ($totaldonate >= 75000000) { $donation_timer = gettimetick(2) + 86400; // 86400 seconds = 2 days donpcevent strnpcinfo(3) + "::OnInit"; } next; mes [email protected]$; mes "The total amount I collected is : ^0000CD[" + $totaldonate + "]^000000 Zeny."; close; function Display_Timer { [email protected] = getarg(0); [email protected] = [email protected] / 3600; [email protected] = ( [email protected] % 3600 ) / 60; [email protected] = [email protected] % 60; [email protected]$ = ([email protected] ? [email protected] + " hour" : ""); [email protected]$ += ([email protected]$ != "" ? " " : "") + ([email protected] ? [email protected]ins + " min" + ([email protected] > 1 ? "s" : "" ) : ""); [email protected]$ += ([email protected]$ != "" ? " " : "") + ([email protected] + " sec") + ([email protected] > 1 ? "s" : "" ); return [email protected]$; } OnInit: if ($totaldonate < 75000000) end; [email protected]_left = $donation_timer - gettimetick(2); if ([email protected]_left <= 0) $totaldonate = 0; else { // unhide npc while ([email protected]_left > 0) { waitingroom Display_Timer( [email protected]_left ),0; sleep 1000; delwaitingroom; [email protected]_left--; } // hidenpc set $totaldonate, 0; $donation_timer = 0; announce "Charity Lucy: Charity Event for 2 Days has ended. Don't forget to donate to activate.",0; sleep 10000; announce "Charity Lucy: Thank you for your generosity.",0; } end; } EDIT : oh well I wasn't supposed to post the whole script in support section >.<
-
can "sit" be use to detect and apply a condition
Capuche replied to mirabell's question in Scripting Support
Use the constant Sitting https://github.com/rathena/rathena/blob/master/src/map/script_constants.h#L472 if ( Sitting == 1 ) dispbottom "You are sitting"; else dispbottom "You are standing"; -
We changed the structure for instance_db.txt // ID,Name,LimitTime,IdleTimeOut,EnterMap,EnterX,EnterY,Map2,...,Map255 It should be for example 12,Abyss Lake Instance,3600,300,abyss_03,160,155
-
Shop's name : Tool dorastor You're trying to call dorastor shop. The name doesn't match.