Emistry

Forum Moderator
  • Content Count

    9,105
  • Avg. Content Per Day

    3
  • Joined

  • Last visited

  • Days Won

    188

Everything posted by Emistry

  1. your char_reg_num table has no data for the NPC to display it. have you checked that?
  2. OnAddPoint: [email protected]_bg = 0; if (.Guillaume_Score > .Croix_Score) [email protected]_bg = [email protected]_id1; else if (.Croix_Score > .Guillaume_Score) [email protected]_bg = [email protected]_id2; if ([email protected]_bg) { addrid(5, 1, "bat_b02"); if (getcharid(4) == [email protected]_bg) { atcommand "@addfame 2 -100"; dispbottom "You lose 100 Fame for losing."; } else { atcommand "@addfame 2 -100"; dispbottom "You lose -100 Fame for losing."; } } end;
  3. OnAddPoint: [email protected]_bg = 0; if (.Guillaume_Score > .Croix_Score) [email protected]_bg = [email protected]_id1; else if (.Croix_Score > .Guillaume_Score) [email protected]_bg = [email protected]_id2; if ([email protected]_bg) { addrid(5, 1, "bat_b02"); if (getcharid(4) == [email protected]_bg) { atcommand "@addfame 2 -100"; dispbottom "You lose 100 Fame for losing."; } else { atcommand "@addfame 2 -100"; dispbottom "You lose -100 Fame for losing."; } [email protected]_bg = 0; } end;
  4. OnAddPoint: if (.Guillaume_Score > .Croix_Score) [email protected]_bg = [email protected]_id1; else if (.Croix_Score > .Guillaume_Score) [email protected]_bg = [email protected]_id2; if ([email protected]_bg) { addrid(5, 1, "bat_b02"); if (getcharid(4) == [email protected]_bg) { atcommand "@addfame 2 -100"; dispbottom "You lose 100 Fame for losing."; } else { atcommand "@addfame 2 -100"; dispbottom "You lose -100 Fame for losing."; } } end;
  5. @makeegg <egg ID> Creates a Pet Egg based on the given ID. *makepet <pet id>; This command will create a pet egg and put it in the invoking character's inventory. The kind of pet is specified by pet ID numbers listed in 'db/(pre-)re/pet_db.yml'. The egg is created exactly as if the character just successfully caught a pet in the normal way. // This will make you a poring: makepet 1002; Notice that you absolutely have to create pet eggs with this command. If you try to give a pet egg with 'getitem', pet data will not be created by the char server and the egg will disappear when anyone tries to hatch it. read the doc
  6. try OnAddPoint: if (.Guillaume_Score > .Croix_Score) [email protected]_bg = [email protected]_id1; else if (.Croix_Score > .Guillaume_Score) [email protected]_bg = [email protected]_id2; [email protected]_id = getcharid(4); if ([email protected]_bg) { addrid(5, 1, "bat_b02"); if ([email protected]_id == [email protected]_bg) { atcommand "@addfame 2 -100"; dispbottom "You lose 100 Fame for losing."; } else { atcommand "@addfame 2 -100"; dispbottom "You lose -100 Fame for losing."; } } end;
  7. for([email protected] = EQI_ACC_L; [email protected] <= EQI_HAND_R; [email protected]++) { if(getequipisequiped([email protected])) { [email protected]$ += F_getpositionname([email protected]) + " - " + "[" + getequipname([email protected]) + "]"; [email protected] = 1; } [email protected]$ += ":"; } you dont really need the array for equipment position, you could use the F_getpositionname(...)
  8. either you are not using the correct script or you are not connecting to the correct db
  9. src/map/itemdb.cpp#L582-L596 /** Specifies if item-type should drop unidentified. * @param nameid ID of item */ char itemdb_isidentified(unsigned short nameid) { // add this part if (nameid == 2613 || nameid == 2610) return 1; int type=itemdb_type(nameid); switch (type) { case IT_WEAPON: case IT_ARMOR: case IT_PETARMOR: case IT_SHADOWGEAR: return 0; default: return 1; } }
  10. pet egg are supposedly given to player by using makeegg atcommand / script commands. giving an egg to player using getitem will simply make the egg broken.
  11. try OnAddPoint: if( .Guillaume_Score > .Croix_Score ) { [email protected]_bg_id = [email protected]_id1; [email protected]_bg_id = [email protected]_id2; } else if( .Croix_Score > .Guillaume_Score ) { [email protected]_bg_id = [email protected]usCTF_id2; [email protected]_bg_id = [email protected]_id1; } else end; [email protected] = bg_get_data([email protected]_bg_id, 1); copyarray [email protected], [email protected], [email protected]; [email protected] = bg_get_data([email protected]_bg_id, 1); copyarray [email protected], [email protected], [email protected]; for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) { if (attachrid([email protected][[email protected]])) { atcommand "@addfame 2 100"; dispbottom "You gained 100 Fame for winning."; detachrid; } } for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) { if (attachrid([email protected][[email protected]])) { atcommand "@addfame 2 -100"; dispbottom "You lose 100 Fame for losing."; detachrid; } } end;
  12. - script atcmd_example -1,{ OnInit: bindatcmd("rentitem", strnpcinfo(3)+"::OnAtcommand"); end; OnAtcommand: [email protected] = atoi([email protected]_parameters$[0]); [email protected] = atoi([email protected]_parameters$[1]); [email protected] = atoi([email protected]_parameters$[2]); [email protected] = atoi([email protected]_parameters$[3]); [email protected] = atoi([email protected]_parameters$[4]); [email protected] = atoi([email protected]_parameters$[5]); if (getitemname([email protected]) != "null") { if (getiteminfo([email protected], 2) != IT_CARD) { rentitem2 [email protected], (24 * 60 * 60),1,[email protected],0,[email protected],[email protected],[email protected],[email protected]; } else { dispbottom [email protected]_command$+" - You cant rent "+getitemname([email protected]); } } else { dispbottom [email protected]_command$+" - invalid item #"[email protected]; } end; }
  13. setup 1 login-server, then 2 char-server and 2 map-server using different port for connection.
  14. src/map/itemdb.cpp#L582-L596 /** Specifies if item-type should drop unidentified. * @param nameid ID of item */ char itemdb_isidentified(unsigned short nameid) { int type=itemdb_type(nameid); switch (type) { case IT_WEAPON: case IT_ARMOR: case IT_PETARMOR: case IT_SHADOWGEAR: return 0; // <--------- REMOVE or Change to 1 default: return 1; } }
  15. OnAddPoint: if( .Guillaume_Score > .Croix_Score ) { [email protected]_bg_id = [email protected]_id1; [email protected]_bg_id = [email protected]_id2; } else if( .Croix_Score > .Guillaume_Score ) { [email protected]_bg_id = [email protected]_id2; [email protected]_bg_id = [email protected]_id1; } if ([email protected]_bg_id) { [email protected] = bg_get_data([email protected]_bg_id, 1); copyarray [email protected], [email protected], [email protected]; for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) { if (attachrid([email protected][[email protected]])) { atcommand "@addfame 2 100"; dispbottom "You gained 100 Fame for winning."; detachrid; } } } if ([email protected]_bg_id) { [email protected] = bg_get_data([email protected]_bg_id, 1); copyarray [email protected], [email protected], [email protected]; for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) { if (attachrid([email protected][[email protected]])) { atcommand "@addfame 2 -100"; dispbottom "You lose 100 Fame for losing."; detachrid; } } } end;
  16. you can try something like this. - script sample -1,{ OnInit: .map$ = "geffen"; setmapflag .map$, mf_loadevent; end; OnPCLoadMapEvent: if (strcharinfo(3) == .map$) { [email protected] = query_sql("SELECT c.`account_id` FROM `char` c INNER JOIN `login` acc ON acc.`account_id` = c.`account_id` WHERE c.`account_id` <> "+getcharid(3)+" AND c.`online` = 1 AND acc.`last_ip` = '"+getcharip()+"'", [email protected]); [email protected] = getcharid(0); for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) if (attachrid([email protected])) { if (strcharinfo(3) == .map$) { [email protected]++; if ([email protected] >= 2) { warp "SavePoint", 0, 0, [email protected]; end; } } } } end; } you should just disable dual client feature when diff the client. and implement client hash checking to avoid other using custom hexed client to bypass that.
  17. - script atcmd_example -1,{ OnInit: bindatcmd("rentitem", strnpcinfo(3)+"::OnAtcommand"); end; OnAtcommand: [email protected] = atoi([email protected]_parameters$[0]); if (getitemname([email protected]) != "null") { if (getiteminfo([email protected], 2) != IT_CARD) { rentitem [email protected], (24 * 60 * 60); // 1 day } else { dispbottom [email protected]_command$+" - You cant rent "+getitemname([email protected]); } } else { dispbottom [email protected]_command$+" - invalid item #"[email protected]; } end; }
  18. probably your setup resolution? hmm
  19. set [email protected], query_sql("SELECT c.`name`, cbg.`rank_points`, c.`division` FROM `char_bg` cbg INNER JOIN `char` c ON c.`char_id` = cbg.`char_id` WHERE cbg.`rank_points` > 0 ORDER BY cbg.`rank_points` DESC LIMIT "+ .top, [email protected]$, [email protected], [email protected]$);
  20. - script Sample -1,{ OnInit: setarray .Map$[0],"prontera","payon","izlude"; setarray .MVP[0],1751,1832,1252,1648; end; OnHour00: OnHour08: killmonster .Map$[ .RandMap ],"All"; if( .event_timer%8 ) end; .event_timer++; set .RandMap,rand( getarraysize( .Map$ ) ); set .RandMVP,rand( getarraysize( .MVP ) ); monster .Map$[ .RandMap ],0,0,"MVP Event",.MVP[ .RandMVP ],1,strnpcinfo(0)+"::OnKilled"; announce "MVP "+getmonsterinfo( .MVP[ .RandMVP ],0 )+" Telah Merusak Kota "+.Map$[ .RandMap ]+" . Seseorang Harus membantu!!",0; initnpctimer; end; OnKilled: announce "MVP telah Mati. Kota telah Aman.",0; OnTimer3600000: killmonster .Map$[ .RandMap ],"All"; stopnpctimer; end; }
  21. something like this ? - script atcmd_example -1,{ OnInit: bindatcmd "guide",strnpcinfo(3) + "::OnAtcommand"; end; OnAtcommand: if ([email protected]_numparameters < 2) { dispbottom "Usage: "[email protected]_command$+" <job> <name>"; } else { [email protected] = aoit([email protected]_parameters$[0]); for ([email protected] = 1; [email protected] <= [email protected]_numparameters; [email protected]++) [email protected]$ += (([email protected] > 1) ? " ":"") + [email protected]_parameters$[[email protected]]; [email protected] = getcharid(3, [email protected]$); if ([email protected] && jobname([email protected]) != "null") { mes "Turn "[email protected]$+" into "+jobname([email protected])+"?"; if (select("Yes", "No") == 1) { close2; attachrid([email protected]); jobchange [email protected]; } } else { dispbottom "Usage: "[email protected]_command$+" <job> <name> - invalid player or job."; } } end; }
  22. add this item id and the function script // ...,{ callfunc("func_ItemClass", Job_Swordman, 10, 69); }, { }, { } function func_ItemClass { [email protected] = getarg(0, Job_Novice); [email protected] = getarg(1, 1); [email protected] = getarg(1, 99); if ([email protected]) { if (BaseLevel >= [email protected] && BaseLevel <= [email protected]) jobchange [email protected]; } return; }
  23. you can try something like this. - script sample -1,{ OnInit: .map$ = "geffen"; setmapflag .map$, mf_loadevent; end; OnPCLoadMapEvent: if (strcharinfo(3) == .map$) { [email protected] = query_sql("SELECT c.`account_id` FROM `char` c INNER JOIN `login` acc ON acc.`account_id` = c.`account_id` WHERE c.`account_id` <> "+getcharid(3)+" AND c.`online` = 1 AND acc.`last_ip` = '"+getcharip()+"'", [email protected]); [email protected] = getcharid(0); for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) if (attachrid([email protected])) { if (strcharinfo(3) == .map$) { [email protected]++; if ([email protected] >= 2) { warp "SavePoint", 0, 0, [email protected]; end; } } } } end; } you should just disable dual client feature when diff the client. and implement client hash checking to avoid other using custom hexed client to bypass that. -- seem like i read wrong the topic contents
  24. Emistry

    Random PvP

    - script Sample -1,{ OnInit: .map$ = "prontera"; end; OnMinute00: // every hour deletearray .aid; mapwarp .map$, "prontera", 155, 181; query_sql("SELECT `account_id`,`char_id`,`name` FROM `char` WHERE `online` = 1 ORDER BY RAND() LIMIT 2", .aid, [email protected], [email protected]$); announce "<SYSTEM> Both '"[email protected]$[0]+"' and '"[email protected]$[1]+"' are selected to join the event. Good luck in killing each other for rewards", bc_all; warp .map$, 0, 0, [email protected][0]; warp .map$, 0, 0, [email protected][1]; end; OnPCKillEvent: if (strcharinfo(3)) { [email protected] = getcharid(3); if (killedrid == [email protected]) [email protected] = .aid[([email protected] == .aid[0])]; if (attachrid([email protected])) { // rewards getitem 512, 1; getitem 512, 2; getitem 512, 3; announce "<SYSTEM> '"+strcharinfo(0)+"' has won.", bc_all; } } deletearray .aid; mapwarp .map$, "prontera", 155, 181; end; } try this.