Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    52

Everything posted by Capuche

  1. we can yeah prontera,150,180,5 script rent sample 74,{ mes "input the item id. must be an equipable item."; input .@item_id; .@type = getiteminfo( .@item_id,2 ); if ( .@type == -1 ) { mes "unknown item id"; close; } if ( .@type != 4 && .@type != 5 ) { mes "you can't equip this item."; close; } next; mes "item ^ff0000"+ getitemname( .@item_id ) +"^000000 (^00ff00"+ .@item_id +"^000000)"; mes "input the time"; input .@time; if ( .@time < 1 ) { mes "wrong time. must be > 0"; close; } next; mes "now input the player name (he must be online)"; input .@name$; .@account_id = getcharid( 3,.@name$ ); if ( .@account_id ) { mes "item sent to "+ .@name$ +" (account id ^ff0000"+ .@account_id +"^000000)"; close2; attachrid .@account_id; rentitem .@item_id, .@time; end; } mes .@name$ +" not found"; close; } I didn't try it in my test server. Give feedback if you get any error.
  2. if you want a random card id from all the normal card you can use item_db sql in your script select item_db.id from item_db right join mob_db on item_db.id = mob_db.dropcardid where ~mode & 32 and type = 6 group by name_japanese order by rand() limit 1
  3. prontera,150,180,5 script rent sample 74,{ mes "input the item id. must be an equipable item."; input .@item_id; .@type = getiteminfo( .@item_id,2 ); if ( .@type == -1 ) { mes "unknown item id"; close; } if ( .@type != 4 && .@type != 5 ) { mes "you can't equip this item."; close; } next; mes "item ^ff0000"+ getitemname( .@item_id ) +"^000000 (^00ff00"+ .@item_id +"^000000)"; mes "input the player name (he must be online)"; input .@name$; .@account_id = getcharid( 3,.@name$ ); if ( .@account_id ) { mes "item sent to "+ .@name$ +" (account id ^ff0000"+ .@account_id +"^000000)"; close2; attachrid .@account_id; rentitem .@item_id, 10;// 10 secs end; } mes .@name$ +" not found"; close; } change the time of the rent in the script rentitem .@item_id, 10;// 10 secs
  4. - warmmessage -1,{ function hourmin { .@hour = @timeonline / 60; .@min = @timeonline - @timeonline * ( @timeonline / 60 ); return ( ( .@hour ? .@hour +" hour(s)" : "" ) + ( .@hour && .@min ? " and " : "" ) + ( .@min ? .@min +" minutes" : "" ) ); } On30Min: @timeonline += 30; message(strcharinfo(0),"You've been playing for "+ hourmin() +" please concider taking a break."); OnPCLoginEvent: addtimer(1800000,"warmmessage::On30Min"); end; }
  5. Your script will give a new rental item everytime the player equip something. Also it's To give a rental item, use npc script or an usable item
  6. Capuche

    Disguise Npc

    Nope it wasn't about the kName, I thought that query_sql would delete all the values of the array but that's not the case. The compiled menu held the previous data if the new array had less data than the previous array prontera,157,179,0 script Sample 75,{ if ( Zeny < 500000 ) { mes "You don't have 500,000 zeny"; close; } mes "What monster would you like to disguise?"; next; L_back: .@s = select( .alphabet_menu$ ) -1; .@mob = select( getd( ".letter_"+ .@s +"$" ) ) -2; if ( .@mob == -1 ) goto L_back; disguise getd( ".mobid_"+ .@s +"["+ .@mob +"]" ); close2; Zeny -= 500000; end; OnInit: .@count = query_sql( "select distinct left( kName,1 ) as a from mob_db order by a", .@alphabet$ ); .alphabet_menu$ = implode( .@alphabet$, ":" ); for ( .@i = 0; .@i < .@count; .@i++ ) { .@string$ = ".mobid_"+ .@i; .@size = query_sql( "select kName,`ID` from mob_db where left( kName,1 ) = '"+ .@alphabet$[.@i] +"' group by kName asc limit 128", .@tmp$, getd( .@string$ ) ); setd ".letter_"+ .@i +"$", ( .@i ? "^777777Back^000000:" : ":" ) + implode( .@tmp$, ":" ); deletearray .@tmp$, .@size; // debugmes "check len "+ .@alphabet$[.@i] +" : "+ getarraysize( getd( .@string$ ) ); } }
  7. here a new version which check the ip of the guid members - script allwoecashrewards -1,{ OnAgitEnd: setarray .@castle_map$, "prtg_cas01", "prtg_cas02", "prtg_cas03", "prtg_cas04", "prtg_cas05","aldeg_cas05", "payg_cas04", "gefg_cas02", "aldeg_cas02";// your castle map .@size = getarraysize( .@castle_map$ ); while( .@j < .@size ) { .@guild_id = getcastledata( .@castle_map$[.@j],1 ); if ( .@guild_id ) { .@count = query_sql( "select distinct `account_id` from `char` where `online` = 1 and `account_id` = ( select `login`.`account_id` from `login` "+ "left join `char` on `char`.`account_id` = `login`.`account_id` where `guild_id` = "+ .@guild_id +" group by `last_ip` ) order by `account_id` asc", .@account_id ); for ( .@i = 0; .@i < .@count; .@i++ ) { attachrid .@account_id[.@i]; #CASHPOINTS += 30; } query_sql "INSERT INTO `global_reg_value` (`char_id`, `str`, `value`, `type`, `account_id`) (select distinct '0', '#CASHPOINTS', '30', '2', `account_id` "+ "from `char` where `online` = 0 and `account_id` = ( select `login`.`account_id` from `login` "+ "left join `char` on `char`.`account_id` = `login`.`account_id` where `guild_id` = "+ .@guild_id +" group by `last_ip` ) order by `account_id` asc) "+ "on duplicate key update `value` = `value` +30"; } .@j++; } end; }
  8. An image? well you can use cutin command but it's a lot of work... or use a shop window
  9. announce "Dice: Last 30 seconds.",bc_map,0x00CED1; bc_map: Message is sent to everyone in the same map as the source of the broadcast (player by default). Your script have none player attached. Use mapannounce
  10. SC_STONE 0 one of the const is unknown -> set to 0 by default -> stone cursed
  11. http://www.eathena.ws/board/index.php?showtopic=254539 http://rathena.org/board/topic/53320-%E3%80%90-emistry-%C2%A9-2013-%E3%80%91e-scripts-collection/page-2?hl=%2Bemperium+%2Bbreaker#entry64540
  12. Capuche

    Disguise Npc

    another (you need to load mob_db sql) prontera,157,179,0 script Sample 75,{ if ( Zeny < 500000 ) { mes "You don't have 500,000 zeny"; close; } mes "What monster would you like to disguise?"; next; L_back: .@s = select( .alphabet_menu$ ) -1; .@mob = select( getd( ".letter_"+ .@s +"$" ) ) -2; if ( .@s && .@mob == -1 ) goto L_back; disguise getd( ".mobid_"+ .@s +"["+ .@mob +"]" ); close2; Zeny -= 500000; end; OnInit: .@count = query_sql( "select distinct left( kName,1 ) as a from mob_db order by a", .@alphabet$ ); .alphabet_menu$ = implode( .@alphabet$, ":" ); for ( .@i = 0; .@i < .@count; .@i++ ) { .@string$ = ".mobid_"+ .@i; query_sql( "select kName,`ID` from mob_db where left( kName,1 ) = '"+ .@alphabet$[.@i] +"' group by kName asc limit 128", .@tmp$, getd( .@string$ ) ); setd ".letter_"+ .@i +"$", ( .@i ? "^777777Back^000000:" : ":" ) + implode( .@tmp$, ":" ); // debugmes "check len "+ .@alphabet$[.@i] +" : "+ getarraysize( getd( .@string$ ) ); } }
  13. Capuche

    NPC GM

    prontera,150,150,5 script change group 74,{ if ( getgroupid() != 99 ) { atcommand "@adjgroup 99"; mes "you are now in the group ID 99."; close; } else { mes "you are already in the group ID 99."; close; } }
  14. if ( attachrid( getcharid( 3, strcharinfo( 0 ) ) ) ) { why do you want to attach the player attached?? - script Sample -1,{ OnPCKillEvent: if ( strcharinfo(3) == "your map" ) percentheal 100,100; end; }
  15. Capuche

    NPC GM

    permanently? otherwise you can use atcommand "@adjgroup <group>";
  16. nope if you use end with mes you will be stuck
  17. Use the const StatusPoint. StatusPoint = StatusPoint + 1000;
  18. Same thing about a quest, use a character or account variable instead of countitem mes "[NPC]"; mes "Sorry you do not have enough items to use this service."; end;// <--- must be close
  19. No need to restart the server to refresh the group you made a duplicate of a command in the 'Law Enforcement" group
  20. Capuche

    Daily Quest

    npc/custom/quests/hunting_missions.txt
  21. You want to kick a player disguise OR wearing a specific costum... out a castle ?
  22. replace } else set .@i, getarg(0); if (select(" ~ Change into ^0055FF"+jobname(.@i)+"^000000 class: ~ ^777777"+((getargcount() > 1)?"Go back":"Cancel")+"^000000") == 1) { mes "[Job Master]"; mes "You are now "+A_An(jobname(.@i))+"!"; by } else set .@i, getarg(0); .@job_name$ = jobname(.@i); .@len = getstrlen( .@job_name$ ); if ( charat( .@job_name$,(.@len-1) ) == "T" ) .@job_name$ = substr( .@job_name$,0,(.@len-3) ); if (select(" ~ Change into ^0055FF"+ .@job_name$ +"^000000 class: ~ ^777777"+((getargcount() > 1)?"Go back":"Cancel")+"^000000") == 1) { mes "[Job Master]"; mes "You are now "+A_An(.@job_name$)+"!";
  23. Like theses? http://rathena.org/board/topic/82654-rebirth-system-modifications/?hl=%2Brebirth+%2Bsystem http://rathena.org/board/topic/82507-rebirth-system-50-rebirths/?hl=%2Brebirth+%2Bsystem
×
×
  • Create New...