Jump to content

sader1992

Content Moderator
  • Posts

    1676
  • Joined

  • Last visited

  • Days Won

    71

Community Answers

  1. 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
  2. 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); .@map$ = getarg(0); .@filename$ = getarg(1); .@position = getarg(2); .@s = getmapunits(BL_PC,.@map$,.@SD); for(.@i=0;.@i<.@s;.@i++){ cutin(.@filename$,.@position,convertpcinfo(.@SD[.@i],CPC_CHAR)); } return; } }  
  3. 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>)))  
  4. sader1992's post in Visuais novos was marked as the answer   
    Unknown Item with Apple icon = Iteminfo.lub/lua
  5. 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; }  
  6. 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
    .@var = rand(2); makeitem .@var?.item_id:.item_id2,1,.@map$,.@x_diff,.@y_diff; // <<< im stuck on this to
    makeitem getd(".item_id" + rand(1,8)),1,.@map$,.@x_diff,.@y_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(.@map$, .@x, .@y, BL_PC); while ( .count < .amount ) { do { .@x_diff = .@x + rand(1,5); .@y_diff = .@y + rand(1,5); } while (!checkcell(.@map$,.@x_diff,.@y_diff,cell_chkpass)); makeitem .ItemID[rand(.Size)],1,.@map$,.@x_diff,.@y_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
  7. 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); }  
  8. 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,.@info); if((.@info[UMOB_MODE]&MD_MVP)){ //item id 501 , count 1 , drop item under the mvp location on death makeitem(501,1,mapid2name(.@info[UMOB_MAPID]),.@info[UMOB_X],.@info[UMOB_Y]); } end; }  
  9. sader1992's post in Limiting a (Shadow) Refiner to refine only 1-2 items was marked as the answer   
    setarray .@p, EQI_SHADOW_ARMOR, EQI_SHADOW_WEAPON; for(.@i=0;.@i<getarraysize(.@p);.@i++){ if(getequipisequiped(.@p[.@i])) .@menu$ += F_getpositionname(.@p[.@i]) + "[ " + getequipname(.@p[.@i]) + " ]"; .@menu$ += ":"; } .@part = .@p[select(.@menu$) -1];  
  10. 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.
  11. 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 ^
  12. 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.
  13. 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.
  14. sader1992's post in clear-up monster was marked as the answer   
    prontera,0,0,0 script Clear-Monsters 444,{ .@zeny = 10000000; mes "do you like to clear all the monsters in this map ?"; mes "It will cost you " + F_InsertComma(.@zeny) + "z"; if(select("Yes:No") == 2) end; clear; if(Zeny < .@zeny){ mes "you don't have " + F_InsertComma(.@zeny) + "z"; end; } Zeny -= .@zeny; killmonsterall(strnpcinfo(4)); mes "Done!"; end; }  
  15. 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"; }  
  16. 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  
  17. 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 .@max_style,getbattleflag( "max_hair_style" ),getbattleflag( "max_hair_color" ),getbattleflag( "max_cloth_color" ); else setarray .@max_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( .@i = 0; .@i < .menu_size; .@i++ ) if( .npc_mode & ( 1 << .@i ) ) if( .item[.@i] ) mes "^0055FF"+.menu_name$[.@i]+" : ^777777"+ .item[.@i] +" x "+getitemname(7420)+"^000000"; else mes "^0055FF"+.menu_name$[.@i]+" : ^777777Free of Charge^000000"; } next; .@style = ( select( .npc_menu$ ) - 1 ); .@style_value = getlook( .look_type[.@style] ); deletearray .@blacklist; switch( .@style ){ Case 0: .@blacklist$ = ","+getd( ".blacklist_hairstyle_"+Sex+"$" )+","; break; Case 1: .@blacklist$ = ","+getd( ".blacklist_haircolor_"+Sex+"$" )+","; break; Case 2: .@blacklist$ = ","+getd( ".blacklist_clothe_"+Sex+"$" )+","; break; default: break; } .@style_number = .min_style[.@style]; do{ next; mes .npc_name$; mes "Current "+.menu_name$[.@style]+" : ^0055FF"+.@style_number+"th^000000"; mes " "; .@removed = 0; if( compare( .@blacklist$,","+.@style_number+"," ) ){ mes "^FF0000NOTE : This style REMOVED^000000"; .@removed = 1; setlook .look_type[.@style],.min_style[.@style]; }else{ setlook .look_type[.@style],.@style_number; if( .item[.@style] ){ mes "Cost : ^777777"+ .item[.@style] +" x "+getitemname(7420)+"^000000"; mes " "; } } .@next = .@style_number + 1; .@prev = .@style_number - 1; if( .@next > .@max_style[.@style] ) .@next = .min_style[.@style]; if( .@prev < .min_style[.@style] ) .@prev = .@max_style[.@style]; .@select = prompt( "Próximo - [ ^777777"+.@next+"th Style^000000 ]", "Voltar - [ ^777777"+.@prev+"th Style^000000 ]", "Pular para...", ( .@removed )?"":"^0055FFCerto, eu quero esse "+.menu_name$[.@style]+"^000000" ); switch( .@select ){ Case 1: .@style_number = .@next; break; Case 2: .@style_number = .@prev; break; Case 3: mes "Available Style : ^0055FF"+.min_style[.@style]+" ~ "+.@max_style[.@style]+"^000000."; input .@style_number,.min_style[.@style],.@max_style[.@style]; break; Case 4: if( .@style_value == .@style_number ){ mes "Swt..this is your original hairstyles."; } else if( .item[.@style] && countitem(7420) < .item[.@style] ){ mes "Você não tem suficientes "+getitemname(7420)+" para mudar a "+.menu_name$[.@style]+"."; }else{ mes "Aproveite seu ^0055FFNEW "+.menu_name$[.@style]+" !!"; if( .item[.@style] ) delitem 7420, .item[.@style]; .@style_value = .@style_number; } default: setlook .look_type[.@style],.@style_value; break; } }while( .@select != 4 && .@select != 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$ = ""; .@i < .menu_size; .@i++ ) .npc_menu$ = .npc_menu$ + ( ( .npc_mode & ( 1 << .@i ) )? .menu_name$[.@i]:"" ) +":"; end; } // NPC Lists prontera,175,202,4 duplicate(Stylist) Estilista#4 878  
  18. 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(.@i=0;.@i<getarraysize(.requirements);.@i+=2){ mes "(" + .requirements[.@i +1] + ") " + getitemname(.requirements[.@i]); } mes "for a random reward ?"; if(select("yes:no") == 2) end; for(.@i=0;.@i<getarraysize(.requirements);.@i+=2){ if(countitem(.requirements[.@i]) < .requirements[.@i+1]){ mes "you dont have (" + .requirements[.@i +1] + ") " + getitemname(.requirements[.@i]); end; } } for(.@i=0;.@i<getarraysize(.requirements);.@i+=2){ delitem .requirements[.@i],.requirements[.@i +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; }  
  19. 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;  
  20. sader1992's post in Arabic encoding not working was marked as the answer   
  21. sader1992's post in Give Item to specific account_id please help ! was marked as the answer   
    setarray .@AIDS,2000001,2000034,2000075,2000002,2000007; if(!#give70 && inarray(.@AIDS,getcharid(3)) != -1){ getitem <id>,<count>; #give70 = true; }  
  22. 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; }  
  23. 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: .@m$ = instance_mapname("job_thief1"); .@n$ = instance_npcname("#testmobs"); monster .@m$,0,0,"Apocalypse",30001,34,.@n$ + "::OnMobsKilled"; monster .@m$,0,0,"Civil Servant",30002,37,.@n$ + "::OnMobsKilled"; monster .@m$,0,0,"Undoer",30003,33,.@n$ + "::OnMobsKilled"; monster .@m$,0,0,"Leaf Cat",30004,35,.@n$ + "::OnMobsKilled"; monster .@m$,0,0,"Enchanter",30005,32,.@n$ + "::OnMobsKilled"; monster .@m$,0,0,"Garm",30006,5,.@n$ + "::OnMobsKilled"; monster .@m$,0,0,"Raydric DeadEye",30007,35,.@n$ + "::OnMobsKilled"; monster .@m$,0,0,"Monkey Fist",30008,22,.@n$ + "::OnMobsKilled"; OnMobsKilled: //announce "Hey, " + strcharinfo(0) + " just killed a Poringz0rd!",bc_blue|bc_all; end; }  
  24. sader1992's post in Custom Autoloot - No Cards and MvPs was marked as the answer   
    on clean
    https://github.com/rathena/rathena/compare/master...sader1992:autoloot_no_mvp_no_card
     
     
     
    you should remove what I sent before
    https://github.com/sader1992/rathena/commit/57018fda8f80db4b9a5e8faa20924ad96c75fb5b
    (this include the undo of the before)

     

  25. sader1992's post in Ubuntu 18 - Make Server Failure was marked as the answer   
    try cmake
    mkdir build && cd build && cmake -G"Unix Makefiles" -DINSTALL_TO_SOURCE=ON .. && make
×
×
  • Create New...