Jump to content

sader1992

Content Moderator
  • Posts

    1,584
  • Joined

  • Last visited

  • Days Won

    61

Community Answers

  1. sader1992's post in Black screen when change langtype was marked as the answer   
    diff , Enforce Official Login Background
  2. sader1992's post in Error compiling was marked as the answer   
    You can follow the recommended and add include string as it's showing in your image.
    I did get that with g++-10 not sure if it's like that in the recommended version (g++-6)
  3. sader1992's post in Abysmal Knight card effect not working was marked as the answer   
    bonus2 bAddClass,c,x; +x% physical damage against class c it increases the attack you get from the str not the weapon and items and other bonus
    so it's not 25% from your last dmg
     
    how it don't work ?
    4140,Knight_Of_Abyss_Card,Abysmal Knight Card,6,20,,10,,,,,,,,2,,,,,{ bonus2 bAddClass,Class_Boss,25; },{},{} bonus2 bAddClass,Class_Boss,25; 
    you can find it in your /rathena/db/re/item_db.txt
  4. sader1992's post in cutin support for announcements was marked as the answer   
    to save time and replies
    here is a step-by-step
    rathena/src/map/script.cpp
    search for
    BUILDIN_FUNC(cutin) { TBL_PC* sd; if( !script_rid2sd(sd) ) return SCRIPT_CMD_SUCCESS; clif_cutin(sd,script_getstr(st,2),script_getnum(st,3)); return SCRIPT_CMD_SUCCESS; } replace
    if( !script_rid2sd(sd) ) with
    if (!script_charid2sd(4, sd))  
    search and replace this
    BUILDIN_DEF(cutin,"si"), with
    BUILDIN_DEF(cutin,"si?"), DON'T FORGET TO RECOMPILE YOUR SERVER!
     
    and this is an example on how i would have done it
    prontera,0,0,0 script gdfjfhadh 444,{ function cutin2; announce("test 1",BC_ALL); cutin2("prontera","pc.bmp",2); sleep 3000; announce("test 2",BC_ALL); cutin2("prontera","",255); sleep 3000; announce("test 3",BC_ALL); cutin2("prontera","pc.bmp",2); sleep 3000; announce("test 4",BC_ALL); cutin2("prontera","",255); end; function cutin2 { freeloop(true); [email protected]$ = getarg(0); [email protected]$ = getarg(1); [email protected] = getarg(2); [email protected] = getmapunits(BL_PC,[email protected]$,[email protected]); for([email protected]=0;[email protected]<[email protected];[email protected]++){ cutin([email protected]$,[email protected],convertpcinfo([email protected][[email protected]],CPC_CHAR)); } return; } }  
  5. sader1992's post in item bonus that only works on GVG/WOE was marked as the answer   
    The code syntax that you provided is wrong
    getmapflag("<map name>",<flag>) || getmapflag("<map name>",<flag>) || getmapflag("<map name>",<flag>) not
    getmapflag("<map name>",<flag> || getmapflag("<map name>",<flag> || getmapflag("<map name>",<flag>)))  
  6. sader1992's post in Visuais novos was marked as the answer   
    Unknown Item with Apple icon = Iteminfo.lub/lua
  7. sader1992's post in Callfunc error was marked as the answer   
    function script my_global_func { mes "this message from 'my_global_func' function from out the npc"; return; } prontera,0,0,0 script func_test 444,{ function my_func; my_func(); next; my_global_func(); next; callfunc("my_other_global_func"); end; function my_func { mes "this message from 'my_func' function from inside the npc"; return; } } function script my_other_global_func { mes "this message from 'my_other_global_func' function from out the npc"; return; }  
  8. sader1992's post in item shower was marked as the answer   
    set .item_id, 12903; // next item id to shower to
    set .item_id1, 12903; // next item id to shower and
    [email protected] = rand(2); makeitem [email protected]?.item_id:.item_id2,1,[email protected]$,[email protected]_diff,[email protected]_diff; // <<< im stuck on this to
    makeitem getd(".item_id" + rand(1,8)),1,[email protected]$,[email protected]_diff,[email protected]_diff; // <<< im stuck on this  
     
    And this is a better way to do your script
    - script Sample -1,{ OnInit: set .amount, 10; // amount of item to shower setarray .ItemID,12903,12904,12905,12906,12907,12908,13576,13584; .Size = getarraysize(.ItemID); bindatcmd "itemshower",strnpcinfo(3)+"::OnShower"; end; OnShower: getmapxy([email protected]$, [email protected], [email protected], BL_PC); while ( .count < .amount ) { do { [email protected]_diff = [email protected] + rand(1,5); [email protected]_diff = [email protected] + rand(1,5); } while (!checkcell([email protected]$,[email protected]_diff,[email protected]_diff,cell_chkpass)); makeitem .ItemID[rand(.Size)],1,[email protected]$,[email protected]_diff,[email protected]_diff; // <<< im stuck on this set .count, .count + 1; } set .count, 0; end; }  
     
    btw "bindatcmd "itemshower",strnpcinfo(3)+"::OnShower";" means any player can use the command
  9. sader1992's post in How do I place a unique_id gepard check on this npc? was marked as the answer   
    or you can do something like
    if(getd("$QID_" + get_unique_id())){ //already got }else{ //get something setd("$QID_" + get_unique_id(),true); }  
  10. sader1992's post in Mvp room with prize for killing an Mvp was marked as the answer   
    - script on_mvp_kill_item -1,{ OnNPCKillEvent: getunitdata(killedgid,[email protected]); if(([email protected][UMOB_MODE]&MD_MVP)){ //item id 501 , count 1 , drop item under the mvp location on death makeitem(501,1,mapid2name([email protected][UMOB_MAPID]),[email protected][UMOB_X],[email protected][UMOB_Y]); } end; }  
  11. sader1992's post in Limiting a (Shadow) Refiner to refine only 1-2 items was marked as the answer   
    setarray [email protected], EQI_SHADOW_ARMOR, EQI_SHADOW_WEAPON; for([email protected]=0;[email protected]<getarraysize([email protected]);[email protected]++){ if(getequipisequiped([email protected][[email protected]])) [email protected]$ += F_getpositionname([email protected][[email protected]]) + "[ " + getequipname([email protected][[email protected]]) + " ]"; [email protected]$ += ":"; } [email protected] = [email protected][select([email protected]$) -1];  
  12. sader1992's post in How to add Randomoption to ProduceItem was marked as the answer   
    sometimes this happen when you add random options in random positions , foe example , if you add an option at 0 and at 2 (and you skipped 1) your item might glitch
    make sure you don't skip a positions in the random options slots.
  13. sader1992's post in Enchanted itens Doesnt trade was marked as the answer   
    look like you enchantment npc give bound items , if you still have this issue , you can post the script you are using here.
    if anyone have this problem, here is the solution ^
  14. sader1992's post in Official Job Change Script was marked as the answer   
    you are using the custom job changer , I am asking about the official quest , all the quest are enabled by default , so just remove the job changer and people would be forced to go do their job quest.
  15. sader1992's post in Gepard License was marked as the answer   
    you should talk to the server owner , and ask him to contact @Functor and ask him about the issue.
  16. sader1992's post in clear-up monster was marked as the answer   
    prontera,0,0,0 script Clear-Monsters 444,{ [email protected] = 10000000; mes "do you like to clear all the monsters in this map ?"; mes "It will cost you " + F_InsertComma([email protected]) + "z"; if(select("Yes:No") == 2) end; clear; if(Zeny < [email protected]){ mes "you don't have " + F_InsertComma([email protected]) + "z"; end; } Zeny -= [email protected]; killmonsterall(strnpcinfo(4)); mes "Done!"; end; }  
  17. sader1992's post in Disable custom command use during WoE was marked as the answer   
    // Heroes of Vanaheim ==================== //======================================== - script at_veil_cmd -1,{ OnVeilWarp: if(agitcheck() || agitcheck2() || agitcheck3()){ mes "you can't use this command while the WoE is running!"; end; } warp "veil",120,145; end; OnInit: bindatcmd "veil", strnpcinfo(0)+"::OnVeilWarp"; }  
  18. sader1992's post in Get value from a char variable was marked as the answer   
    int64 value = pc_readregistry(sd, reference_uid(add_str("VARIABLE"), 0)); 0 = THE Index if you are using array , if not leave it 0  
  19. sader1992's post in npc with access restriction was marked as the answer   
    I didn't test it
    // credits to Annieruru - script Stylist -1,{ if(vip_status(VIP_STATUS_ACTIVE)) setarray [email protected]_style,getbattleflag( "max_hair_style" ),getbattleflag( "max_hair_color" ),getbattleflag( "max_cloth_color" ); else setarray [email protected]_style,29,80,180; cutin "hairstyle_"+Sex, 3; mes .npc_name$; mes "Eu posso mudar sua aparência."; if( .item_size ){ mes " "; mes "^777777[ TAXAS DO SERVIÇO ]^000000"; for( [email protected] = 0; [email protected] < .menu_size; [email protected]++ ) if( .npc_mode & ( 1 << [email protected] ) ) if( .item[[email protected]] ) mes "^0055FF"+.menu_name$[[email protected]]+" : ^777777"+ .item[[email protected]] +" x "+getitemname(7420)+"^000000"; else mes "^0055FF"+.menu_name$[[email protected]]+" : ^777777Free of Charge^000000"; } next; [email protected] = ( select( .npc_menu$ ) - 1 ); [email protected]_value = getlook( .look_type[[email protected]] ); deletearray [email protected]; switch( [email protected] ){ Case 0: [email protected]$ = ","+getd( ".blacklist_hairstyle_"+Sex+"$" )+","; break; Case 1: [email protected]$ = ","+getd( ".blacklist_haircolor_"+Sex+"$" )+","; break; Case 2: [email protected]$ = ","+getd( ".blacklist_clothe_"+Sex+"$" )+","; break; default: break; } [email protected]_number = .min_style[[email protected]]; do{ next; mes .npc_name$; mes "Current "+.menu_name$[[email protected]]+" : ^0055FF"[email protected]_number+"th^000000"; mes " "; [email protected] = 0; if( compare( [email protected]$,","[email protected]_number+"," ) ){ mes "^FF0000NOTE : This style REMOVED^000000"; [email protected] = 1; setlook .look_type[[email protected]],.min_style[[email protected]]; }else{ setlook .look_type[[email protected]],[email protected]_number; if( .item[[email protected]] ){ mes "Cost : ^777777"+ .item[[email protected]] +" x "+getitemname(7420)+"^000000"; mes " "; } } [email protected] = [email protected]_number + 1; [email protected] = [email protected]_number - 1; if( [email protected] > [email protected]_style[[email protected]] ) [email protected] = .min_style[[email protected]]; if( [email protected] < .min_style[[email protected]] ) [email protected] = [email protected]_style[[email protected]]; [email protected] = prompt( "Próximo - [ ^777777"[email protected]+"th Style^000000 ]", "Voltar - [ ^777777"[email protected]+"th Style^000000 ]", "Pular para...", ( [email protected] )?"":"^0055FFCerto, eu quero esse "+.menu_name$[[email protected]]+"^000000" ); switch( [email protected] ){ Case 1: [email protected]_number = [email protected]; break; Case 2: [email protected]_number = [email protected]; break; Case 3: mes "Available Style : ^0055FF"+.min_style[[email protected]]+" ~ "[email protected]_style[[email protected]]+"^000000."; input [email protected]_number,.min_style[[email protected]],[email protected]_style[[email protected]]; break; Case 4: if( [email protected]_value == [email protected]_number ){ mes "Swt..this is your original hairstyles."; } else if( .item[[email protected]] && countitem(7420) < .item[[email protected]] ){ mes "Você não tem suficientes "+getitemname(7420)+" para mudar a "+.menu_name$[[email protected]]+"."; }else{ mes "Aproveite seu ^0055FFNEW "+.menu_name$[[email protected]]+" !!"; if( .item[[email protected]] ) delitem 7420, .item[[email protected]]; [email protected]_value = [email protected]_number; } default: setlook .look_type[[email protected]],[email protected]_value; break; } }while( [email protected] != 4 && [email protected] != 255 ); close; OnInit: waitingroom "[Estilista]",0; // NPC name .npc_name$ = "[^0055FF ::: Estilista ::: ^000000]"; // NPC Mode ( Bitmask ) // 1 - Enable Hairstyle // 2 - Enable Hair Color // 4 - Enable Cloth Color .npc_mode = 7; // Menu Name setarray .menu_name$, "Estilo do Cabelo", "Cor do Cabelo", "Cor da Roupa"; // Payment (7420) setarray .item, 5, // Hairstyle 5, // Hair Color 5; // Cloth Color // Blacklisted Style for each style and each gender. // --- Female --- .blacklist_hairstyle_0$ = "2,4,6"; .blacklist_haircolor_0$ = "1,3,5"; .blacklist_cloth_0$ = "143,188,261"; // --- Male --- .blacklist_hairstyle_1$ = "3,5,7"; .blacklist_haircolor_1$ = "2,4,6"; .blacklist_cloth_1$ = "143,188,261"; // Dont edit setarray .min_style,getbattleflag( "min_hair_style" ),getbattleflag( "min_hair_color" ),getbattleflag( "min_cloth_color" ); .menu_size = getarraysize( .menu_name$ ); .item_size = getarraysize( .item ); setarray .look_type,LOOK_HAIR,LOOK_HAIR_COLOR,LOOK_CLOTHES_COLOR; for( .npc_menu$ = ""; [email protected] < .menu_size; [email protected]++ ) .npc_menu$ = .npc_menu$ + ( ( .npc_mode & ( 1 << [email protected] ) )? .menu_name$[[email protected]]:"" ) +":"; end; } // NPC Lists prontera,175,202,4 duplicate(Stylist) Estilista#4 878  
  20. sader1992's post in Quest NPC With Random Reward was marked as the answer   
    prontera,0,0,0 script quest 444,{ mes "do you want to exchange the items:"; for([email protected]=0;[email protected]<getarraysize(.requirements);[email protected]+=2){ mes "(" + .requirements[[email protected] +1] + ") " + getitemname(.requirements[[email protected]]); } mes "for a random reward ?"; if(select("yes:no") == 2) end; for([email protected]=0;[email protected]<getarraysize(.requirements);[email protected]+=2){ if(countitem(.requirements[[email protected]]) < .requirements[[email protected]+1]){ mes "you dont have (" + .requirements[[email protected] +1] + ") " + getitemname(.requirements[[email protected]]); end; } } for([email protected]=0;[email protected]<getarraysize(.requirements);[email protected]+=2){ delitem .requirements[[email protected]],.requirements[[email protected] +1]; } getitem .rewards[rand(getarraysize(.rewards))],1; announce "player: " + strcharinfo(0) + "Did the quest!!!!",bc_all; end; OnInit: setarray .rewards,7073,7074,7075,7076,7077,7078,7079,7080,7081,7082; setarray .requirements,7020,10,1054,50,7035,15,1009,50,7442,50; end; }  
  21. sader1992's post in Script Event Random was marked as the answer   
    something like this ?
    // OnClock<hour><minute>: donpcevent "<npc_name>::OnStart"; OnClock0000: OnClock0400: OnClock0800: OnClock1200: OnClock1600: OnClock2000: switch(rand(1,6)){ case 1: donpcevent "Event_1::OnStart"; end; case 2: donpcevent "Event_2::OnStart"; end; case 3: donpcevent "Event_3::OnStart"; end; case 4: donpcevent "Event_4::OnStart"; end; case 5: donpcevent "Event_5::OnStart"; end; case 6: donpcevent "Event_6::OnStart"; end; } or
    // OnClock<hour><minute>: donpcevent "<npc_name>::OnStart"; OnClock0000: OnClock0400: OnClock0800: OnClock1200: OnClock1600: OnClock2000: donpcevent "Event_" + rand(1,6) + "::OnStart"; end;  
  22. sader1992's post in Arabic encoding not working was marked as the answer   
  23. sader1992's post in Give Item to specific account_id please help ! was marked as the answer   
    setarray [email protected],2000001,2000034,2000075,2000002,2000007; if(!#give70 && inarray([email protected],getcharid(3)) != -1){ getitem <id>,<count>; #give70 = true; }  
  24. sader1992's post in 1 day rental with 1 click was marked as the answer   
    prontera,154,180,0 script rental item 444,{ if(#CASHPOINTS){ rentitem <item id>,<time>;//time in seconds, 1 day = 86400 #CASHPOINTS -= 1; } end; OnInit: waitingroom "[ Click Me! ]",0; end; }  
  25. sader1992's post in Adding monster was marked as the answer   
    this wont excite anyway

     
    try to use OnInstanceInit: , also with what mentioned above about the map name,
    also for the npc name *instance_npcname("<npc name>"{,<instance id>})
     
    job_thief1,1,1,0 script #testmobs HIDDEN_WARP_NPC,{ //mes "Hi there"; close; OnInstanceInit: [email protected]$ = instance_mapname("job_thief1"); [email protected]$ = instance_npcname("#testmobs"); monster [email protected]$,0,0,"Apocalypse",30001,34,[email protected]$ + "::OnMobsKilled"; monster [email protected]$,0,0,"Civil Servant",30002,37,[email protected]$ + "::OnMobsKilled"; monster [email protected]$,0,0,"Undoer",30003,33,[email protected]$ + "::OnMobsKilled"; monster [email protected]$,0,0,"Leaf Cat",30004,35,[email protected]$ + "::OnMobsKilled"; monster [email protected]$,0,0,"Enchanter",30005,32,[email protected]$ + "::OnMobsKilled"; monster [email protected]$,0,0,"Garm",30006,5,[email protected]$ + "::OnMobsKilled"; monster [email protected]$,0,0,"Raydric DeadEye",30007,35,[email protected]$ + "::OnMobsKilled"; monster [email protected]$,0,0,"Monkey Fist",30008,22,[email protected]$ + "::OnMobsKilled"; OnMobsKilled: //announce "Hey, " + strcharinfo(0) + " just killed a Poringz0rd!",bc_blue|bc_all; end; }  
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.