Jump to content

Emistry

Forum Moderator
  • Posts

    10018
  • Joined

  • Days Won

    409

Everything posted by Emistry

  1. change to account variables. carfingor --> #carfingor qcargo1 --> #qcargo1 cquest --> #cquest
  2. prontera,155,181,5 script Sample 4_F_KAFRA1,{ if (gettimetick(2) > #COOLDOWN_REWARD) { #COOLDOWN_REWARD += (gettimetick(2) + 60); // 60 seconds. getitem 512, 1; getitem 512, 2; getitem 512, 3; } mes "You obtained rewards, come back again after "+(#COOLDOWN_REWARD - gettimetick(2))+" seconds."; close; } if you're using the quest system then you can use this to check the duration. checkquest(<quest_id>, PLAYTIME, 2)
  3. - script Sample -1,{ OnInit: bindatcmd "sample",strnpcinfo(3)+"::OnAtcommand"; end; OnAtcommand: if(getgroupid() < 1) { callfunc "sample2"; } else { callfunc "sample1"; } end; } btw getgroupid aren't vip level.
  4. there are several ways to do it ... one of the most common way .. OnInit: OnTimer1000: delwaitingroom; waitingroom "PvP Arena ["+getmapusers("pvproom")+"]",0; initnpctimer; end;
  5. str = (dstr*10 + dex*10/5 + status->luk*10/3 + cap_value(((TBL_PC*)bl)->status.base_level, 1, 175)*10/4)/10; cap_value(((TBL_PC*)bl)->status.base_level, 1, 175) <-- cap the value between 1 ~ 175
  6. rename the event label into OnXXX and assign it to your instance monsters. (instance_coins::OnXXXX) else leave the event label empty to have it trigger the global event.
  7. if you're asking to make this script to work for ALL pvp and gvg maps then change this OnPCKillEvent: if( strcharinfo(3) != .map$ ) end; into this OnPCKillEvent: .@map$ = strcharinfo(3); if (!getmapflag(.@map$, mf_pvp) && !getmapflag(.@map$, mf_gvg)) end;
  8. unknown syntax aren't part of script command errors. check your script instead, ensure you follow the structure for NPC script. if you are not sure, then post the full script and full error messages.
  9. your char_reg_num table has no data for the NPC to display it. have you checked that?
  10. OnAddPoint: $@win_bg = 0; if (.Guillaume_Score > .Croix_Score) $@win_bg = $@FlaviusCTF_id1; else if (.Croix_Score > .Guillaume_Score) $@win_bg = $@FlaviusCTF_id2; if ($@win_bg) { addrid(5, 1, "bat_b02"); if (getcharid(4) == $@win_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;
  11. OnAddPoint: $@win_bg = 0; if (.Guillaume_Score > .Croix_Score) $@win_bg = $@FlaviusCTF_id1; else if (.Croix_Score > .Guillaume_Score) $@win_bg = $@FlaviusCTF_id2; if ($@win_bg) { addrid(5, 1, "bat_b02"); if (getcharid(4) == $@win_bg) { atcommand "@addfame 2 -100"; dispbottom "You lose 100 Fame for losing."; } else { atcommand "@addfame 2 -100"; dispbottom "You lose -100 Fame for losing."; } $@win_bg = 0; } end;
  12. OnAddPoint: if (.Guillaume_Score > .Croix_Score) .@win_bg = $@FlaviusCTF_id1; else if (.Croix_Score > .Guillaume_Score) .@win_bg = $@FlaviusCTF_id2; if (.@win_bg) { addrid(5, 1, "bat_b02"); if (getcharid(4) == .@win_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;
  13. @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
  14. try OnAddPoint: if (.Guillaume_Score > .Croix_Score) .@win_bg = $@FlaviusCTF_id1; else if (.Croix_Score > .Guillaume_Score) .@win_bg = $@FlaviusCTF_id2; .@bg_id = getcharid(4); if (.@win_bg) { addrid(5, 1, "bat_b02"); if (.@bg_id == .@win_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;
  15. for(.@i = EQI_ACC_L; .@i <= EQI_HAND_R; .@i++) { if(getequipisequiped(.@i)) { .@menu$ += F_getpositionname(.@i) + " - " + "[" + getequipname(.@i) + "]"; .@equipped = 1; } .@menu$ += ":"; } you dont really need the array for equipment position, you could use the F_getpositionname(...)
  16. either you are not using the correct script or you are not connecting to the correct db
  17. 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; } }
  18. 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.
  19. try OnAddPoint: if( .Guillaume_Score > .Croix_Score ) { .@win_bg_id = $@FlaviusCTF_id1; .@lose_bg_id = $@FlaviusCTF_id2; } else if( .Croix_Score > .Guillaume_Score ) { .@win_bg_id = $@FlaviusCTF_id2; .@lose_bg_id = $@FlaviusCTF_id1; } else end; .@size1 = bg_get_data(.@win_bg_id, 1); copyarray .@arenamembers1, $@arenamembers, .@size1; .@size2 = bg_get_data(.@lose_bg_id, 1); copyarray .@arenamembers2, $@arenamembers, .@size2; for (.@i = 0; .@i < .@size1; .@i++) { if (attachrid(.@arenamembers1[.@i])) { atcommand "@addfame 2 100"; dispbottom "You gained 100 Fame for winning."; detachrid; } } for (.@i = 0; .@i < .@size2; .@i++) { if (attachrid(.@arenamembers2[.@i])) { atcommand "@addfame 2 -100"; dispbottom "You lose 100 Fame for losing."; detachrid; } } end;
  20. - script atcmd_example -1,{ OnInit: bindatcmd("rentitem", strnpcinfo(3)+"::OnAtcommand"); end; OnAtcommand: .@itemid = atoi(.@atcmd_parameters$[0]); .@refine = atoi(.@atcmd_parameters$[1]); .@card1 = atoi(.@atcmd_parameters$[2]); .@card2 = atoi(.@atcmd_parameters$[3]); .@card3 = atoi(.@atcmd_parameters$[4]); .@card4 = atoi(.@atcmd_parameters$[5]); if (getitemname(.@itemid) != "null") { if (getiteminfo(.@itemid, 2) != IT_CARD) { rentitem2 .@itemid, (24 * 60 * 60),1,.@refine,0,.@card1,.@card2,.@card3,.@card4; } else { dispbottom .@atcmd_command$+" - You cant rent "+getitemname(.@itemid); } } else { dispbottom .@atcmd_command$+" - invalid item #"+.@itemid; } end; }
  21. setup 1 login-server, then 2 char-server and 2 map-server using different port for connection.
  22. 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; } }
  23. OnAddPoint: if( .Guillaume_Score > .Croix_Score ) { .@win_bg_id = $@FlaviusCTF_id1; .@lose_bg_id = $@FlaviusCTF_id2; } else if( .Croix_Score > .Guillaume_Score ) { .@win_bg_id = $@FlaviusCTF_id2; .@lose_bg_id = $@FlaviusCTF_id1; } if (.@win_bg_id) { .@size = bg_get_data(.@win_bg_id, 1); copyarray .@arenamembers, $@arenamembers, .@size; for (.@i = 0; .@i < .@size; .@i++) { if (attachrid(.@arenamembers[.@i])) { atcommand "@addfame 2 100"; dispbottom "You gained 100 Fame for winning."; detachrid; } } } if (.@lose_bg_id) { .@size = bg_get_data(.@lose_bg_id, 1); copyarray .@arenamembers, $@arenamembers, .@size; for (.@i = 0; .@i < .@size; .@i++) { if (attachrid(.@arenamembers[.@i])) { atcommand "@addfame 2 -100"; dispbottom "You lose 100 Fame for losing."; detachrid; } } } end;
  24. you can try something like this. - script sample -1,{ OnInit: .map$ = "geffen"; setmapflag .map$, mf_loadevent; end; OnPCLoadMapEvent: if (strcharinfo(3) == .map$) { .@size = 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()+"'", .@aid); .@cid = getcharid(0); for (.@i = 0; .@i < .@size; .@i++) if (attachrid(.@aid)) { if (strcharinfo(3) == .map$) { .@count++; if (.@count >= 2) { warp "SavePoint", 0, 0, .@cid; 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.
  25. - script atcmd_example -1,{ OnInit: bindatcmd("rentitem", strnpcinfo(3)+"::OnAtcommand"); end; OnAtcommand: .@itemid = atoi(.@atcmd_parameters$[0]); if (getitemname(.@itemid) != "null") { if (getiteminfo(.@itemid, 2) != IT_CARD) { rentitem .@itemid, (24 * 60 * 60); // 1 day } else { dispbottom .@atcmd_command$+" - You cant rent "+getitemname(.@itemid); } } else { dispbottom .@atcmd_command$+" - invalid item #"+.@itemid; } end; }
×
×
  • Create New...