Jump to content

Skorm

Forum Moderator
  • Posts

    1282
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Skorm

  1. Skorm

    HIRE NPC

    I can do all but add it to party. First add this NPC: prontera,119,162,3 script Hired Help 56,{ //Dialogue if(@hired){ mes .npcn$; mes "It Looks like you two are having fun. Well don't let me stop you- carry on!"; close; } mes .npcn$; mes "Hello, would you be interested in purchasing some of my lovely ladies?"; mes "They buff you, heal you, and even revive you!!"; mes "So what do you say, huh?"; next; if(select("Yes:No")&2) { mes .npcn$; mes "You're missing out!"; close; } mes .npcn$; mes "It's 1z per-second with these beautiful gals."; input(.@time); if(.@time>Zeny) { mes .npcn$; mes "You don't have enough. That's just too bad. Oh well better luck next time."; close; } close2; //End //Working parts set .@gid,bg_monster(.@bg,.npcm$,0,0,"Ellsie",.mobid,"Hired Help::OnFoobar"); summon("[Hired Help] "+.hhnm$[rand(1,getarraysize(.hhnm$))],.mobid,.@time*1000,"Hired Help::OnBroken"); set @hired,1; set Zeny,Zeny-.@time; killmonster .npcm$,"Hired Help::OnFoobar"; set .@gid,.@gid+1; .@usrid=getcharid(3); query_sql("SELECT ROUND(("+MaxHp+"*"+((.hpat>9)?"0."+(.hpat/10):"0.0"+(.hpat))+"));",.@hp); while( set(.@i,.@i+1)&&playerattached()&&.@i<=.@time ) { set .@map$,strcharinfo(3); sleep2 1000; if(!((.@i%240)-1)) {//Example of mob used buff. while(.buffs[((set(.@i,.@i+2)-2)%240)]) { unitskilluseid .@gid,.buffs[((.@i%240)-2)],.buffs[(((.@i%240)+1)-2)],.@usrid; sleep2 2000; } sc_start 32,240000,10,.@gid; //Increase her speed so she can keep up with us. } if(!Hp) unitskilluseid .@gid,54,4,.@usrid; if(Hp<.@hp&&Hp) unitskilluseid .@gid,28,99,.@usrid; } killmonster .@map$,"Hired Help::OnBroken"; set @hired,0; end; //End //NPC Variables OnInit: set .hpat, 70; //Heals the player when HP drops below this percent. You want this below 100 at all times. set .mobid,4000; //ID of your custom mob. set .npcn$,"[^0000FFGreg^000000]"; set .npcm$,strnpcinfo(4); setarray .buffs[1], 29, 10, 34, 10; // Skill_id, Skill_lv, Etc. setarray .hhnm$[1], "Ellsie", "Jenny", "Ashley", "Meghan", "Wenndy", "Anna"; //Hired npc will be randomly named from these values. } To make it look like an ArchBishop: Last: Enjoy! P.S: Make sure to replace all instances of 4000 with your custom mob id. Prototype:
  2. Post the code from pc.c not the whole file though just the parts you edited, and tell me if the compliler has an errors. Edit: Move: if(src->type == BL_PC) sd->warpgodelay_tick = tick+warpgodelaycd; //This is the timer Below: if( !src || src == &sd->bl ) return; Or else command that do damage like @heal -1 or @die will crash the map server.
  3. Oh I didn't know that's what you wanted. In pc.c After: int warpgodelaycd = 5000; //This is the delay in milliseconds you can set what ever delay you want Make sure you change that back to 5000... Replace: sd->warpgodelay_tick = tick+warpgodelaycd; //This is the timer With: if(src->type == BL_PC) sd->warpgodelay_tick = tick+warpgodelaycd; //This is the timer
  4. Have you tried changing- int warpgodelaycd = 5000; In src/map/pc.c to something like- int warpgodelaycd = 0;
  5. I really don't care to much about searching a whole maps worth of monsters when I could just use an event label from the permanent spawn.[2] The ability to return their GIDs is pretty cool though... Which makes me think that we should have a variable for OnMobDeathLabels filled with the gid kinda like Killerrid/killedrid. killedgid... What I'm really interested in is searching the information of one attached mob as he travels the land of RO... With your comment about getmapxy are you saying it could be used to search and return mob position information based on GID as it stands in the current trunk?[1] Or would that be something you'd implement later, and I'm also a little confused on the usage? set .@gid,bg_monster(.@bg,"prontera",100,100,"Poringz0rd",1002); getmapxy(.@map$,.@x,.@y,3,.@gid+""); Anyways that's my two cents... Thumbs up to the whole project. [1] Looked at the source... case 3: //Get Mob Position break; //Not supported? [2]Thought about it and getting monster information BEFORE it dies could be useful. Nanakiwartz idea helped.
  6. I'll be sure to try this when I get home... or after I wake up... haven't slept in over 24 hours. Working perfectly tytyty, pretty lady! Personally I think this should be added to the SVN because seriously why the hell don't they have this yet.
  7. I guess that all depends on who you're talking to. Me? Yes! OnEmo: .@d=2; //Delay in seconds. .@b=gettimetick(2); if(.@atcmd_parameters$[0]!=""&&@a<=.@ for(.@a=0;.@a<getarraysize(.emo$);.@a++) if(compare(.emo$[.@a],.@atcmd_parameters$[0])) { @a=.@b+.@d; emotion .@a,1; end; } if(@a>.@ end; dispbottom "Emotion not found!";
  8. I don't see why not. - script Drop Emulator -1,{ OnNPCKillEvent: set .@mid, killedrid; set .@ar$, ".mob"+.@mid; set .@len, getarraysize(getd(.@ar$)); if(.@len){ for(set .@p,1; .@p<.@len;set .@p,.@p+2 ) { set .@itm, getd(.@ar$+"["+(.@p-1)+"]"); set @itmtyp, getiteminfo(.@itm,2); set .@btflg, callfunc("Monster_DB",.@mid); set .@itmrt, getd(.@ar$+"["+.@p+"]"); query_sql("SELECT ROUND("+.@itmrt+"*("+.@btflg+"/100));",.@rte); if(((.@rte<=10000)?((rand(1,10000/.@rte)==1)?1:0):1)) { getitem .@itm,1; } } } end; OnInit: //By Skorm //Example Poring Apple, 10%, Apple, 1.5%....etc setarray .mob1893, 7539, 8000, 512, 150, 619, 20, 713, 1500, 909, 7000, 938, 400, 1202, 100, 4001, 1; // Mob List 10000=100% can support up to 128 values } function script Monster_DB { switch(getarg(0)){ case 1893: switch(@itmtyp){ // Keep in mind these are precents overall so 20% is actually lower while 140% is actually 40% higher. // Where 200% is double... It's like saying 2*400=800. case 0: // Heal Item Rate (Healing Items) return 100; // 100% for healing items. case 2: case 7: case 11: case 18: // Uasable Item Rate (Anything Usable that doesn't heal) return 100; // 100% for healing items. case 3: // Common Item Rate (ETC) return 100; //100% more for Common Items. case 4: case 5: case 8: case 10: // Equip Item Rate (Ammo, Pet Equip, Weapon, Armor) return 100; // 100% more for equip items. case 6: // Card Item Rate (Card) return 100; // 100% more for cards. } case 1003: case 1004: case 1005: //...to add new monsters simply do as I've done. } } I don't know the IDs of your potion drop or your custom box drops so you'll have to add them. //Example Poring Apple, 10%, Apple, 1.5%....etc setarray .mob1893, 7539, 8000, 512, 150, 619, 20, 713, 1500, 909, 7000, 938, 400, 1202, 100, 4001, 1; // Mob List 10000=100% can support up to 128 values
  9. If you're running flux it could be done from the cp_createlog.
  10. Skorm

    Requesting

    Thank you, Capuche, very sexy post.
  11. I've seen some servers had it set to whisper the server itself which is by default located in the whisper menu perhaps that's what you've done?
  12. Skorm

    Requesting

    Yeah I also tried gettingt he script. No luck...
  13. Is there anyway I can return the NPCs direction as well? Right now only gid and rid seem to work. Edit: I tried sending the npcs GID through as a parameter and that didn't seem to work either.
  14. I think this is best done with script... You can add new coditions to the existing emotions like "flg1|korean",. tytyty Usage: @emotion flg1 If you want to shorten it to @emo. bindatcmd "emo",strnpcinfo(3)+"::OnEmo"; - script f_emotions -1,{ OnInit: /*-----*/ /*---------*/ /*-------*/ /*-------*/ /*----*/ setarray .emo$, "!|gasp", "?|what|huh", "ho" , "lv" , "swt" , "ic" , "an" , "ag" , "$" , "..." , "gawi" , "bawi" , "bo" , "flg1" , "lv2" , "thx" , "wah" , "sry" , "heh" , "swt2" , "hmm" , "no1" , "??" , "omg" , "oh" , "x" , "hlp" , "go" , "sob" , "gg" , "kis" , "kis2" , "pif" , "ok" , "" , "flg2" , "bzz" , "rice" , "awsm" , "meh" , "shy" , "pat" , "mp" , "slur" , "com" , "yawn" , "grat" , "hp" , "flg3" , "flg4" , "flg5" , "flg6" , "fsh" , "spin" , "sigh" , "dum" , "crwd" , "otl" , "dice1" , "dice2", "dice3" , "dice4" , "dice5" , "dice6" , "flg7" , "luv" , "flg8" , "flg9" , "mobile" , "mail" , "flg10" , "antenna1" , "antenna2", "antenna3", "hum" , "abs" , "oops" , "spit" , "ene" , "panic", "whisp" ; bindatcmd "emotion",strnpcinfo(3)+"::OnEmo"; end; OnEmo: for(.@a=0;.@a<getarraysize(.emo$);.@a++) { if(compare(.emo$[.@a],.@atcmd_parameters$[0])) { emotion .@a,1; end; } } dispbottom "Emotion not found!"; } /* e_gasp 0 = ! e_what 1 = ? e_ho 2 = ho e_lv 3 = lv e_swt 4 = swt e_ic 5 = ic e_an 6 = an e_ag 7 = ag e_cash 8 = $ e_dots 9 = ... e_scissors 10 = gawi e_rock 11 = bawi e_paper 12 = bo e_korea 13 = flg1 e_lv2 14 = lv2 e_thx 15 = thx e_wah 16 = wah e_sry 17 = sry e_heh 18 = heh e_swt2 19 = swt2 e_hmm 20 = hmm e_no1 21 = no1 e_no 22 = ?? e_omg 23 = omg e_oh 24 = oh e_X 25 = x e_hlp 26 = hlp e_go 27 = go e_sob 28 = sob e_gg 29 = gg e_kis 30 = kis e_kis2 31 = kis2 e_pif 32 = pif e_ok 33 = ok e_mute 34 = "" e_indonesia 35 = flg2 e_bzz 36 = bzz e_rice 37 = rice e_awsm 38 = awsm e_meh 39 = meh e_shy 40 = shy e_pat 41 = pat e_mp 42 = mp e_slur 43 = slur e_com 44 = com e_yawn 45 = yawn e_grat 46 = grat e_hp 47 = hp e_philippines 48 = flg3 e_malaysia 49 = flg4 e_singapore 50 = flg5 e_brazil 51 = flg6 e_flash 52 = fsh e_spin 53 = spin e_sigh 54 = sigh e_dum 55 = dum e_loud 56 = crwd e_otl 57 = otl e_dice1 58 = dice1 e_dice2 59 = dice2 e_dice3 60 = dice3 e_dice4 61 = dice4 e_dice5 62 = dice5 e_dice6 63 = dice6 e_india 64 = flg7 e_luv 65 = luv e_russia 66 = flg8 e_virgin 67 = flg9 e_mobile 68 = mobile e_mail 69 = mail e_chinese 70 = flg10 e_antenna1 71 = antenna1 e_antenna2 72 = antenna2 e_antenna3 73 = antenna3 e_hum 74 = hum e_abs 75 = abs e_oops 76 = oops e_spit 77 = spit e_ene 78 = ene e_panic 79 = panic e_whisp 80 = whisp */ Old Version 1: Uses npc shortcuts for emotes. Edit: Code tag didn't work the first time.
  15. Great I thought I heard something about that do you have the link to it I'd also be interested init.
  16. I'd use fakename for something like this it's the only way to get that real-time name change effect. //Example 1599,Angra_Manyu,Angra Manyu,4,1,,10,200,,2,0,0xFFFFFFFF,7,2,2,1,1,1,8,{ bonus bAllStats,50; bonus bBaseAtk,3800; bonus2 bHPDrainRate,1000,100; },{ callfunc("F_Namer",1599); },{ callfunc("F_Namer"); } function script F_Namer { explode(.@item$,getitemname(getarg(0,574))," "); if(.@item$[0]!="Egg") atcommand "@fakename ["+.@item$[0]+"]"+strcharinfo(0); else atcommand "@fakename"; end; }
  17. Skorm

    Level NPC

    prontera,155,180,0 script Leveler 100,{ if ( BaseLevel < 80 || BaseLevel > 90 || #GAIN == 10 ) end; set .@item_id, 6011; // your item id required set .@npc_name$, strnpcinfo(1); mes "[ " + .@npc_name$ + " ]"; mes "Want to gain 1 level?"; next; if (select("Yes:No") - 1) end; if (!countitem(.@item_id)) { mes "[ " + .@npc_name$ + " ]"; mes "Sorry but you need a " +getitemname(.@item_id)+ " to gain 1 level"; close; } set BaseLevel, BaseLevel + 1; set #GAIN, #GAIN + 1; delitem .@item_id,1; mes "[ " + .@npc_name$ + " ]"; mes "Gained 1 level!"; close; }
  18. But you can create a script Where the Char's get listed as Message out from DB. So you dont need to select char in login sceen. I'm not 100% sure what your asking... but I could list characters from an account in a menu or message if that's what you want. If you're asking to recreate the character selection menu functionality that I cannot do.
  19. You can't use variables in a case condition. you could do case 1, case 2, case 3... etc Or: mes "Select a name from the menu below."; if(select(implode(.@JSName$,":"))) mes "Alright "+.@JSName$[@menu]+" it is then!"; You don't need the for loop because the tmp character variable @menu is populated by select() starting at 1. so if you set your array like setarray .@JSName$[1],"Mike","Scott","Phillip","Jesus"; @menu lines up with the players selection. You can then access the values by an if statment or whatever. if(!@menu-4) {mes "I think Jesus is great too!!";} Anyways I hope this example helps you a little. Edit: Editor Keeps breaking up my tabs -.-*
  20. Stydianx's post reminded me that you have to delete characters to... but there is also a bunch of other information to delete. CREATE TEMPORARY TABLE TmpTable AS (SELECT `account_id`,`char_id` FROM `char` WHERE `account_id` IN (SELECT `account_id` FROM `login` WHERE `lastlogin` < (CURRENT_TIMESTAMP - interval '5' month))); #Add tables to delete from here. DELETE FROM `guild` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `skill` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `quest` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `mercenary_owner` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `auction` WHERE `seller_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `mercenary` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `memo` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `inventory` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `hotkey` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `cart_inventory` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `homunculus` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `friends` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `global_reg_value` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `elemental` WHERE `char_id` IN (SELECT `char_id` FROM TmpTable); DELETE FROM `pet` WHERE `account_id` IN (SELECT `account_id` FROM TmpTable); DELETE FROM `party` WHERE `leader_id` IN (SELECT `account_id` FROM TmpTable); DELETE FROM `guild_member` WHERE `account_id` IN (SELECT `account_id` FROM TmpTable); DELETE FROM `sc_data` WHERE `account_id` IN (SELECT `account_id` FROM TmpTable); DELETE FROM `storage` WHERE `account_id` IN (SELECT `account_id` FROM TmpTable); DELETE FROM `char` WHERE `account_id` IN (SELECT `account_id` FROM TmpTable); DELETE FROM `login` WHERE `account_id` IN (SELECT `account_id` FROM TmpTable); DELETE FROM `login` WHERE `lastlogin` < (CURRENT_TIMESTAMP - interval '5' month); DROP TABLE TmpTable; Will delete all accounts that haven't logged in for less than 5 months.
  21. Mobs Limit(MAX 128) is the amount of mobs selected from the database lowering it to 5 would spawn 5 different types of monsters from the level range. #SpawnMobs is the number of times that type of monster will be spawned. So it's #SpawnMobs times Mobs Limit(MAX 128). If you were to lower #SpawnMobs down to 1 you would get 128 different random monsters from your database depending on the search results. I hope you understand. Yes the mobs do re-spawn when you attack it with a skill or weapon, but commands like @killmonster don't attach the character to the monster when it's killed. If you use GM commands they will not re-spawn.
  22. It opens only once if the gold room never closeI see what you did there.
×
×
  • Create New...