Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    51

Everything posted by Capuche

  1. There is a src bug. A quick fix in the script, replace all occurence of BaseJob == Job_SuperNovice by Class == Job_SuperNovice || Class == Job_Super_Baby
  2. Maybe search in http://nn.nachtwolke.com/dev/npclist/?qq=all you may find what you want
  3. well add getguildmasterid( getcastledata( strnpcinfo(4),1 ) ) != getcharid(0) getcastledata( strnpcinfo(4),1 ) return the castle owner guild id getguildmasterid return the char id of the guild master of the guild if (getgmlevel() > 98 || getguildmasterid( getcastledata( strnpcinfo(4),1 ) ) != getcharid(0) )
  4. You can use a NPC with OnTouch prontera,160,150,0 script -1,5,5,{// 5x5 area around the npc OnTouch: if (getgmlevel() > 98) warp "Savepoint",0,0; end; }
  5. You should provide the script to talk about it btw it's obviously a mistake in getitem2, you inserted your card in <card1> instead of <card4> *getitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>}; Check your script !
  6. Each player talking to the npc run an unique instance. 2 players talking to a npc don't share their scope variable. When a player stop talking the script end and the scope variable - attached the instance- are deleted from memory (no need to keep them in memory isn't it? otherwise it's a waste of memory).
  7. prontera,150,150,1 script dfh 56,{ if (BaseLevel > 100) .@item_id = 504;// white potion else .@item_id = 501 + (BaseLevel -1) / 25; if ( ( 150 + Weight ) < ( MaxWeight/2 ) ) { .@weight_healt = getiteminfo(.@item_id,6); .@amount_healt = ( MaxWeight /2 - Weight ) / ( 2 *.@weight_healt ); .@amount_blue = ( MaxWeight /2 - Weight - .@weight_healt * .@amount_healt ) / 150; if ( ( .@weight_healt * .@amount_healt + .@amount_blue * 150 + Weight ) >= ( MaxWeight/2 ) ) .@amount_healt--; getitem .@item_id, .@amount_healt; getitem 505, .@amount_blue; } end; } the conditions are in .@item_id = 501 + (BaseLevel -1) / 25;
  8. or like prontera,150,150,1 script dfh 56,{ if (BaseLevel > 100) .@item_id = 504;// white potion else .@item_id = 501 + (BaseLevel -1) / 25; if ( ( getiteminfo(.@item_id,6) + Weight ) < ( MaxWeight/2 ) ) { .@amount = ( MaxWeight /2 - Weight ) / getiteminfo(.@item_id,6);// 50% maxweight - my weight / item weight if ( ( getiteminfo(.@item_id,6) * .@amount + Weight ) >= ( MaxWeight/2 ) )// weight at exactly 50% .@amount--; getitem .@item_id, .@amount; } end; } Stolao care about the lvl > 100 for 501 + Baselevel / 25
  9. I think it's because of $@Tabula_Game_start["+$@i+"] > 0) donpcevent it should be $@Tabula_Game_start[$@i] > 0) donpcevent
  10. Capuche

    Fusion Item

    Random success rate? .@success_rate = rand(1,100); the fail rate is 100 - success if you want an array setarray .@success[0],10,20,30,40,50; .@success_rate = .@success[ rand(5) ];
  11. Maybe add something like if (status_get_mode(bl)&MD_BOSS) break; // This skill doesn't affect to Boss monsters or if (((TBL_MOB*)bl)->mob_id == <your mob id>) break; under case UNT_THORNS_TRAP: in skill.c. I'm a newbie in c btw
  12. Please check your variable name ! .@c_id$ became .@c_id .@n$ not defined .@c_stats became .@c_stats$
  13. } end;// <-- add this OnClock1200:
  14. Capuche

    Fusion Item

    I don't understand what you mean but if ( rand(1,100) <= 10 ) { is the condition for the success ; if a random number between 1 and 100 is below 10 success If you want to change the rate fro example you can define a variable for the success rate and add it in the message .@success_rate = 10; mes ( 100 - .@success_rate ) +"% Fail and "+ .@success_rate +"% success."; //... if ( rand(1,100) <= .@success_rate ) {
  15. Capuche

    Fusion Item

    My bad.. you're right and I forgot to delete the requirement mes "[ Fused Card ]"; mes "-- Fused Phreeoni Card --"; next; setarray .@items[0], 501, 505, 503, 504; setarray .@amounts[0], 1, 1, 1, 1; mes "-- Requirements --"; for ( .@i = 0; .@i < 4; .@i++ ) { if ( countitem(.@items[.@i]) >= .@amounts[.@i] ) { .@total++; .@color$ = "^0000ff1"; } else .@color$ = "^ff00000"; mes "x"+ .@color$ +"/"+ .@amounts[.@i] +" "+ getitemname(.@items[.@i]); } next; mes "-- New Effect --"; mes "HIT +150"; mes "Add a 5% chance of auto casting Stone Curse status when hit by enemy."; next; mes "-- Success Rate --"; mes "90% Fail and 10% success."; if ( .@total == 4 ) { next; if ( select( "Do it", "Bye" ) == 1 ) { if ( rand(1,100) <= 10 ) { mes "Success !"; getitem <your item>,1; } else { mes "Failed"; } for ( .@i = 0; .@i < 4; .@i++ ) delitem .@items[.@i],.@amounts[.@i]; } } close; I added the an array for the amount
  16. Capuche

    Fusion Item

    mes "[ Fused Card ]"; mes "-- Fused Phreeoni Card --"; next; setarray .@items[0], 501, 505, 503, 504; mes "-- Requirements --"; for ( .@i = 0; .@i < 5; .@i++ ) { if ( countitem(.@items[.@i]) > 0 ) { .@total++; .@color$ = "^0000ff1"; } else .@color$ = "^ff00000"; mes "x"+ .@color$ +"/1 "+ getitemname(.@items[.@i]); } next; mes "-- New Effect --"; mes "HIT +150"; mes "Add a 5% chance of auto casting Stone Curse status when hit by enemy."; next; mes "-- Success Rate --"; mes "90% Fail and 10% success."; if ( .@total == 4 ) { next; if ( select( "Do it", "Bye" ) == 1 ) { if ( rand(1,100) <= 10 ) { mes "Success !"; getitem <your item>,1; } else { mes "Failed"; } } } close;
  17. It's if ( checkquest(20501,HUNTING) == 0 || checkquest(20501,HUNTING) == 1 ) for active quest == 2 for completed
  18. function script rewardchest { setarray .@reward, 20103,1, 60, 20104,1, 10, 20105,1, 10, 20106,1, 10, 20106,1, 5, 20107,1, 5; .@size = getarraysize( .@reward ); for( set .@i, 2; .@i < .@size; .@i += 3 ) .@percent[.@i] += .@reward[.@i]; .@r = rand( .@percent[ .@size -1 ] +1 ); for( set .@i, 2; .@i < .@size; .@i += 3 ) if( .@percent[.@i] > .@r ) break; getitem .@reward[ .@i-2 ], .@reward[ .@i-1 ]; return; }
  19. Another way should be to call both label when you kill a mob https://github.com/rathena/rathena/blob/master/src/map/mob.c#L2672
  20. Try SELECT `account_id`,COUNT( `nameid` ) AS `total` FROM `storage` GROUP BY `account_id` HAVING `total` >= 400 ORDER BY `total` DESC
  21. PVPLADDEROPTIONS npc disabled because uncommented comment - script PVPLADDEROPTIONS -1,{ end; OnInit: 0 = Disabled (NO) <---- comment this 1 = Enable (YES) <---- comment that Note This is a script made by Terces
  22. - script Only1perMAC -1,{ OnPCLoadMapEvent: if ( getgmlevel() >= 99 ) end; .@mymap$ = strcharinfo(3); .@amount = query_sql( "SELECT `name` FROM `char` LEFT JOIN login ON `char`.account_id=login.account_id WHERE last_mac"+ "=(SELECT last_mac FROM login WHERE account_id="+getcharid(3)+") AND online=1 AND char_id!="+getcharid(0), .@name$ ); if ( .@amount > 0 ) { for ( ; .@i < .@amount; .@i++ ) { getmapxy .@map$, .@x, .@y, 0, .@name$[.@i]; if ( .@map$[.@i] == .@mymap$ ) break; } if ( .@i < .@amount ) { announce "Sorry, only 1 account per computer can be logged in at a time.", bc_self; sleep2 1000; atcommand "@kick "+strcharinfo(0); } } end; } prontera mapflag loadevent
×
×
  • Create New...