Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    52

Everything posted by Capuche

  1. http://rathena.org/board/topic/87120-transitioning-from-svn-to-git/
  2. .@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 ); .@account_id give you the list of first account id with the same ip of the player online in the guild .@guild_id
  3. It checks the specific item id in inventory database, item equipped or not. The script is more accurate if the players are offline.
  4. There are none command to force the pet to return into its eggs, but you can restrict the access to the map. prontera,163,185,5 script warp event 56,{ if ( petstat(PET_CLASS) ) { mes "You can enter with your pet."; close; } warp "<event map>",0,0; end; } + mapflag itemnoequip and restricted like Kido said.
  5. Try prontera,166,185,6 script ghjkl 56,{ if ( getgmlevel() < 99 ) end; mes "Enter an item id or item name. Display a list order by max amount found."; input .@tmp$; set .@item_id, atoi( .@tmp$ ); if ( .@item_id == 0 && getstrlen( .@tmp$ ) > 2 ) {// item name, eventually set .@count, searchitem( .@tmp_array, .@tmp$ ); if ( .@count == 0 ) {// none item found mes "None item found."; close; } mes "I found the following items: "; next; while( .@i < .@count ) { set .@menu$, .@menu$ + getitemname( .@tmp_array[.@i] ) +" (ID "+ .@tmp_array[.@i] +"):"; set .@i, .@i +1; } set .@s, select( .@menu$ ) -1; set .@item_id, .@tmp_array[.@s]; } else if ( .@item_id == 0 || getiteminfo( .@item_id,2 ) == -1 ) { mes "Wrong item id"; close; } set .@search$, "`nameid` = "+ .@item_id +" or `card0` = "+ .@item_id +" or `card1` = "+ .@item_id +" or `card2` = "+ .@item_id +" or `card3` = "+ .@item_id; while(1) { set .@count, query_sql( "SELECT `char`.`name`, "+ "( SELECT COALESCE( SUM(`amount`),0 ) FROM `inventory` WHERE `char`.`char_id` = `inventory`.`char_id` and ( "+ .@search$ +" ) ) AS inv, "+ "( SELECT COALESCE( SUM(`amount`),0 ) FROM `cart_inventory` WHERE `char`.`char_id` = `cart_inventory`.`char_id` and ( "+ .@search$ +" ) ) AS cart, "+ "( SELECT COALESCE( SUM(`amount`),0 ) FROM `storage` WHERE `storage`.`account_id` = `char`.`account_id` and ( "+ .@search$ +" ) ) AS sto, "+ "( SELECT COALESCE( SUM(`amount`),0 ) FROM `guild_storage` WHERE `guild_storage`.`guild_id` = `char`.`guild_id` and ( "+ .@search$ +" ) ) AS gsto "+ "FROM `char` order by ( inv + cart + sto + gsto ) desc limit "+ ( .@page * 100 ) +", 100", .@name$, .@inventory, .@cart, .@storage, .@gstorage ); if ( .@count == 0 ) break; for ( set .@i, 0; .@i < .@count && .@name$[.@i] != ""; set .@i, .@i +20 ) { mes "^ff0000<player>^000000 <inv>,^00ff00<cart>,^0000ff<sto>,^006600<gsto>"; for ( set .@j, 0; .@j < 20 && .@name$[ (.@i+.@j) ] != ""; set .@j, .@j +1 ) { set .@tmp, .@i + .@j; if ( ( .@inventory[.@tmp] + .@cart[.@tmp] + .@storage[.@tmp] + .@gstorage[.@tmp] ) == 0 ) { next; goto L_end;// XP! } set .@num, .@num +1; mes .@num +"/ ^ff0000"+ .@name$[.@tmp] +"^000000 : < "+ .@inventory[.@tmp] +", ^00ff00"+ .@cart[.@tmp] +", ^0000ff"+ .@storage[.@tmp] +", ^006600"+ .@gstorage[.@tmp] +"^000000 >"; } next; } set .@page, .@page +1; } L_end: mes "*end of the list*"; close; } It use data sql, the update is not intantaneous.
  6. - script hourlypoints -1,{ //--Start of the Script OnPCLoginEvent: attachnpctimer ""+strcharinfo(0)+""; initnpctimer; end; OnTimer30000: //Check if Vending (normal or @at) if(checkvending() >= 1 || checkchatting() == 1) { dispbottom "The hourly points event stopped because you were vending / chatting. Please relog if you wish to start again."; stopnpctimer; end; } //Check if Idle getmapxy( .@map$, .@x, .@y, 0 ); if(@map$ == .@map$ && @x == .@x && @y == .@y) { set @afk, @afk + 1; } //If move timer resets else { set @afk, 0; } set @map$, .@map$; set @x, .@x; set @y, .@y; //Idle Check for 5 Minutes if(@afk == 10) { dispbottom "The hourly points event stopped because you were idle for 5 mins. Please relog if you wish to start again."; stopnpctimer; end; } end; OnTimer60000: set @minute, @minute + 1; //Check for 1 Minute if(@minute == 10){ set @minute,0; getitem 7558,1; dispbottom "You received 1 "+getitemname( 7227 )+" by staying ingame for 10 mins"; } stopnpctimer; initnpctimer; end; } I guess you mean giving an item every 10mins...
  7. otherwise try disguise .@mobid; -> atcommand "@disguise "+ .@mobid;
  8. Item script part : { addtimer 1,"Dummy::Onmachin"; progressbar "FFFF00",2; /* give item */ },{},{} NPC part : - script Dummy -1,{ Onmachin: }
  9. You warp your character on the map and write @doommap... or give us more infos : you want doommap all the map every 10 secs ? you want a command to doommap all the map at once ? other...
  10. query_sql "SELECT `userid` FROM `login` WHERE `email` = '$@email$'",$@userid$; should be query_sql "SELECT `userid` FROM `login` WHERE `email` = '" + $@email$ + "'",$@userid$; same thing in insert if (!$@email$) ... $@email$ is a string variable, "!" is unappropriate it should be if ($@email$ == "") setarray .@DonateItems[0], 5518, 5518, 25000; setarray .@DonateAmount[0], 1, 1, 100; OnInit: these arrays should be definited under OnDoDonate: label like that OnDoDonate: setarray .@DonateItems[0], 5518, 5518, 25000; setarray .@DonateAmount[0], 1, 1, 100;
  11. You mean : disabled pet on castle map during guild war ? conf/battle/pet.conf#L77
  12. This emu throw an error with disguise command, but the command is in the source. It may be an issue with Hercules.
  13. The const name of the class are in db/const.txt db/const.txt#L17
  14. Exactly. Put the view id of the clip for a clip and changebase Class; when he unequip.
  15. - script atcmd_example -1,{ OnInit: bindatcmd "question",strnpcinfo(3)+"::OnAtcommand"; .x_radius = 10; .y_radius = 10; .x_center = 150;// radius... center... no need explanation it's obvious .y_center = 150; end; OnAtcommand: do { .@x = rand( (.x_center-.x_radius), (.x_center+.x_radius) ); .@y = rand( (.y_center-.y_radius), (.y_center+.y_radius) ); .@loop++; if ( .@loop == 1000 ) { message strcharinfo(0), "Too much people. You must wait. Command failed."; end; } } while( getareausers( "prontera",.@x,.@y,.@x,.@y ) || !checkcell( "prontera",.@x,.@y,cell_chkpass ) ); warp "prontera",.@x,.@y; createchatroom( getcharid(3), "Question", "",5 ); sit; end; }
  16. It's too vague for me... I don't get what you want sorry.
  17. ??? you quote Blue Jem and my post. Very confusing... Blue Jem use a function. She call the function with an item. Mine is a npc script that create a custom @randomdisguise command. I can't reproduce your mapserv error, what emulator are you using ?
  18. The map is in the ea link.
  19. No need to make another topic to revive the other one. Topic closed.
  20. Drop your table, use this one instead : CREATE TABLE IF NOT EXISTS `rewardaccountnpc` ( `account_id` int(11) unsigned NOT NULL, `reward_id` int(11) unsigned NOT NULL, `reward_amount` int(11) unsigned NOT NULL, KEY `account_id` (`account_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; prontera,150,150,0 script Sample 100,{ query_sql( "SELECT `accountid`, `reward_id`, `reward_amount` FROM `rewardaccountnpc` ",.@acc_id,.@reward_id,.@reward_amount ); .@size = getarraysize( .@acc_id ); for( .@i = 0; .@i < .@size; .@i++ ) set .@menu$,.@menu$ + .@acc_id[.@i] +" - " + .@reward_amount[.@i] + " x "+getitemname( .@reward_id[.@i] ) + ":"; .@i = select( .@menu$ ) - 1; mes "Pick : "+.@acc_id[.@i]; mes "Reward : "+.@reward_amount[.@i] + " x "+getitemname( .@reward_id[.@i] ); getitem .@reward_id[.@i], .@reward_amount[.@i], .@acc_id[.@i]; query_sql "DELETE FROM `rewardaccountnpc` WHERE (`accountid` = '"+ .@acc_id[.@i]+"' AND `reward_id` = '"+.@reward_id[.@i]+ "') AND `reward_amount` = '"+.@reward_amount[.@i]+"' limit 1"; close; }
  21. *copy/past your script in notepad. 3 seconds later -> found a problem in * Basic_Scripting#Structure
  22. Do you want to only change the appearance or the class ? Appearance : changebase Job_Novice; // Changes player to Novice sprite. Class : jobchange Job_Novice; // Changes player to Novice
  23. You want an npc ig ? prontera,150,150,5 script boum 456,{ if ( getgmlevel() < 60 ) end; input .item_id; if ( getiteminfo( .item_id,1 ) == -1 ) { message "wrong item id"; end; } addrid 0; if ( getgmlevel() >= 60 ) end; .@amount = countitem( .item_id ); if ( .@amount ) { delitem .item_id, .@amount; atcommand "@kick "+ strcharinfo(0); } end; }
  24. or like this ? - script panpanlelapin -1,{ OnInit: bindatcmd "randomdisguise",strnpcinfo(3)+"::OnAtcommand",60,60;// your min gmlevel .min_mobid = 1002; .max_mobid = 2000; .blacklist$ = "|1200|1201|1203|";// you don't want these mobs end; OnAtcommand: do .@mobid = rand( .min_mobid,.max_mobid ); while( compare( .blacklist$, ("|"+ .@mobid +"|") ) || getmonsterinfo( .@mobid,MOB_LV ) == -1 ); disguise .@mobid; end; }
  25. - script item_cmd -1,{ OnInit: .password$ = "MouHahahaha!"; bindatcmd "item",strnpcinfo(3)+"::OnAtcommand",60,60;// your min gmlevel end; OnAtcommand: .@myname$ = strcharinfo(0); message .@myname$, "@item password ?"; input .@tmp$; if ( .@tmp$ != .password$ ) message .@myname$, "Wrong password."; else atcommand "@item "+ implode( .@atcmd_parameters$," " ); end; }
×
×
  • Create New...