Jump to content

Patskie

Community Contributors
  • Content Count

    366
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Patskie

  1. Trigger a command on a OnPCKillEvent label : *soundeffect "<effect filename>",<type>;*soundeffectall "<effect filename>",<type>{,"<map name>"}{,<x0>,<y0>,<x1>,<y1>};These two commands will play a sound effect to either the invokingcharacter only ('soundeffect') or multiple characters ('soundeffectall').If the running code does not have an object ID (a 'floating' NPC) or isnot running from an NPC object at all (an item script) the sound will becentered on the character who's RID got attached to the script, if any.If it does, it will be centered on that object. (an NPC sprite)Effect filename is the filename in a GRF. It must have the .wav extension.It's not quite certain what the 'type' actually does, it is sent to theclient directly. It probably determines which directory to play the effectfrom. It's certain that giving 0 for the number will play sound files from'datawav', but where the other numbers will read from is unclear.The sound files themselves must be in the PCM format, and file namesshould also have a maximum length of 23 characters including the .wavextension:soundeffect "1234567890123456789.wav", 0; // will play the soundeffectsoundeffect "12345678901234567890.wav", 0; // throws gravity errorYou can add your own effects this way, naturally.
  2. I've made a lot of posts regarding this : - shop dynamicshop -1,501:20prontera,150,150,0 script Dynamic Shop 100,{ callshop "dynamicshop",1; npcshopattach "dynamicshop"; end; OnBuyItem: for ( set .@j, 0; .@j < getarraysize(.items); set .@j, .@j + 2 ) { for ( set .@k, 0; .@k < getarraysize(@bought_nameid); set .@k, .@k + 1 ) { if ( @bought_nameid[.@k] == .items[.@j] ) { if ( checkweight( @bought_nameid[.@k], @bought_quantity[.@k] ) ) { if ( countitem(.currency) < .items[.@j+1] || countitem(.currency) < ( .items[.@j+1] * @bought_quantity[.@k] ) ) dispbottom "You don't have enough " +getitemname(.currency)+ " to purchase this item."; else { delitem .currency, .items[.@j+1] * @bought_quantity[.@k]; getitem @bought_nameid[.@k], @bought_quantity[.@k]; } } else dispbottom "You cannot carry out more items with you"; } } } deletearray @bought_quantity, getarraysize(@bought_quantity); deletearray @bought_nameid, getarraysize(@bought_nameid); end; OnInit: set .currency, 7227; // TCG is used to buy items setarray .items, 4001,5,7227,100; // Usage : <item id>,<price> npcshopitem "dynamicshop",0,0; for ( set .@i, 0; .@i < getarraysize(.items); set .@i, .@i + 2 ) npcshopadditem "dynamicshop",.items[.@i],.items[.@i+1]; end;}
  3. Patskie

    OnClock command

    Every 3 hours the event will start
  4. Not sure : - script Sample -1,{ OnMinute00: if ( ( gettime(3) % 2 ) == 0 ) monster "prontera",150,150,"Emperium",1288,1,strnpcinfo(1)+ "::OnKill"; end; OnKill: announce strcharinfo(0)+ " breaks the Emperium",0; getitem 7227,10; end;}
  5. Try this one : - script Sample -1,{ OnPCLoginEvent: if ( gettimetick(2) < #timer ) { dispbottom "You already claimed the rewards"; end; } for ( .@i = 0; .@i < .size; .@i += 2 ) { getitem .Items[.@i], .Items[.@i+1]; #timer = gettimetick(2) + ( .time_interval * 86400 ); end; } OnInit: .time_interval = 1; // n day(s) setarray .Items[0],7227,50,7179,70; // <item id>,<item amount> .size = getarraysize(.Items); end;}
  6. Try this : - shop dynamicshop -1,501:222prontera,150,150,0 script Dynamic Shop 100,{ callshop "dynamicshop",1; npcshopattach "dynamicshop"; end; OnBuyItem: for ( set .@j, 0; .@j < getarraysize(.items); set .@j, .@j + 2 ) { for ( set .@k, 0; .@k < getarraysize(@bought_nameid); set .@k, .@k + 1 ) { if ( @bought_nameid[.@k] == .items[.@j] ) { if ( checkweight( @bought_nameid[.@k], @bought_quantity[.@k] ) ) { if ( countitem(.currency) < .items[.@j+1] ) dispbottom "You don't have enough " +getitemname(.currency)+ " to purchase this item."; else { delitem .currency, .items[.@j+1] * @bought_quantity[.@k]; getitem @bought_nameid[.@k], @bought_quantity[.@k]; } } else dispbottom "You cannot carry out more items with you"; } } } deletearray @bought_quantity, getarraysize(@bought_quantity); deletearray @bought_nameid, getarraysize(@bought_nameid); end; OnInit: set .currency, 7179; // pods setarray .items, 4001,5,7227,100; // Usage : <item id>,<price> npcshopitem "dynamicshop",0,0; for ( set .@i, 0; .@i < getarraysize(.items); set .@i, .@i + 2 ) npcshopadditem "dynamicshop",.items[.@i], .items[.@i+1]; end;} Configuration Part : set .currency, 7179; // podssetarray .items, 4001,5,7227,100; // Usage : <item id>,<price>
  7. I think you need the npctalk command. the mes command within a npc will not work unless a certain player click the npc.
  8. Refer to the following commands : *npctalk "<message>";This command will display a message to the surrounding area as if the NPCobject running it was a player talking - that is, above their head and inthe chat window. The display name of the NPC will get appended in front ofthe message to complete the effect. // This will make everyone in the area see the NPC greet the character // who just invoked it. npctalk "Hello "+strcharinfo(0)+", how are you?"; *npcspeed <speed value>;*npcwalkto <x>,<y>;*npcstop;These commands will make the NPC object in question move around the map.As they currently are, they are a bit buggy and are not useful for muchmore than making an NPC move randomly around the map.'npcspeed' will set the NPCs walking speed to a specified value. As in the@speed GM command, 200 is the slowest possible speed while 0 is thefastest possible (instant motion). 100 is the default character walkingspeed.'npcwalkto' will start the NPC sprite moving towards the specifiedcoordinates on the same map as it is currently on. The script proceedsimmediately after the NPC begins moving.'npcstop' will stop the motion.While in transit, the NPC will be clickable, but invoking it will cause itto stop moving, which will make it's coordinates different from what theclient computed based on the speed and motion coordinates. The effect israther unnerving.Only a few NPC sprites have walking animations, and those that do, do notget the animation invoked when moving the NPC, due to the problem in theNPC walking code, which looks a bit silly. You might have better successby defining a job-sprite based sprite id in 'db/mob_avail.txt' with this.
  9. To attach all party member. try : getpartymember getcharid(1), 2;for ( set .@i, 0; .@i < $@partymembercount; set .@i, .@i + 1 ) { detachrid; if ( attachrid($@partymemberaid[.@i]) ) { // do whatever }}
  10. use MS visual studio to compile your server Thanks alot!
  11. Every kill the points will add no matter what
  12. Try the following : 1. On that script, find : OnPCKillEvent: if ( getgmlevel() >= .gmnokill ) end; getmapxy .@map$, .@x, .@y, 0; 2. Change to : OnPCKillEvent: if ( getgmlevel() >= .gmnokill ) end; getmapxy .@map$, .@x, .@y, 0; set #KILLPOINTS, #KILLPOINTS + 1; 3. Use this script or multi-currency shop by @Emistry : - shop dynamicshop -1,501:50prontera,150,150,0 script Dynamic Shop 100,{ callshop "dynamicshop",1; npcshopattach "dynamicshop"; end; OnBuyItem: for ( set .@j, 0; .@j < getarraysize(.items); set .@j, .@j + 2 ) { for ( set .@k, 0; .@k < getarraysize(@bought_nameid); set .@k, .@k + 1 ) { if ( @bought_nameid[.@k] == .items[.@j] ) { if ( checkweight( @bought_nameid[.@k], @bought_quantity[.@k] ) ) { if ( .currency < .items[.@j+1] ) dispbottom "You don't have enough kill points to purchase this item."; else { .currency -= .items[.@j+1] * @bought_quantity[.@k]; getitem @bought_nameid[.@k], @bought_quantity[.@k]; } } else dispbottom "You cannot carry out more items with you"; } } } deletearray @bought_quantity, getarraysize(@bought_quantity); deletearray @bought_nameid, getarraysize(@bought_nameid); end; OnInit: set .currency, "#KILLPOINTS"; // kill points is used to buy items setarray .items, 4001,5,7227,100,7179,50,4002,5,4003,4,4004,2; // Usage : <item id>,<price> npcshopitem "dynamicshop",0,0; for ( set .@i, 0; .@i < getarraysize(.items); set .@i, .@i + 2 ) npcshopadditem "dynamicshop", .items[.@i], .items[.@i+1]; end;} 4. Configuration : - Put all the items you want to sell with kill points. Check usage. setarray .items, 4001,5,7227,100,7179,50,4002,5,4003,4,4004,2; // Usage : <item id>,<price> 5. Found error? Report it here, show your console command. PS : don't know if this will work. never tried on my test server as i am doing a lot of things.
  13. try this one - script debuffer -1,{OnInit: setarray .Map$[0], "arug_cas01", "schg_cas01", "schg_cas02"; set .size, getarraysize(.Map$); for ( set .@i, 0; .@i < .size; set .@i, .@i + 1 ) setmapflag .Map$[.@i], mf_loadevent; end; OnPCLoadMapEvent: getmapxy(@map$, @x, @y, 0); while ( .@j < .size ) { if ( @map$ == .Map$[.@j] ) sc_end SC_ALL; set .@j, .@j + 1; } end;}
  14. src/map/status.c. You are in the english section of the hercules emulator. You should avoid using your native language in all english section unless ofcourse your native language is english.
  15. Professor / Wizard ( intelligence / 5 ) : if (sc && sc->data[SC_SOULLINK] && (sc->data[SC_SOULLINK]->val2 == SL_SAGE || sc->data[SC_SOULLINK]->val2 == SL_WIZARD)) vit += ((TBL_PC*)bl)->status.int_ / 5; Professor / Wizard ( BaseLevel * 200 ) : if (sc && sc->data[SC_SOULLINK] && (sc->data[SC_SOULLINK]->val2 == SL_SAGE || sc->data[SC_SOULLINK]->val2 == SL_WIZARD)) maxhp += ((TBL_PC*)bl)->status.base_level * 200; Star Gladiator ( Perfect Dodge + 10 ) : if (sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_STAR) flee2 += 10; Star Gladiator ( Holy Monster & Boss Monster Additional Damage ) : if (sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_STAR) { sd->right_weapon.addrace[RC_BOSS] += 100; sd->left_weapon.addrace[RC_BOSS] += 100; sd->right_weapon.addele[ELE_HOLY] += 100; sd->left_weapon.addele[ELE_HOLY] += 100;} One thing is for sure. This is not 100% accurate nor will work. Hercules emulator have a different source structure.
  16. The array will not increment. It will stay at index 0
  17. @Wolf your result is : 82000820028200482006820088201082012820148201682018 Should be : 8200082001820028200382004820058200682007820088200982010 Besides checkquest is not an array checkquest( @i ); // not checkquest[ .@i ]
  18. To make this short, use a loop : Short version ( didn't try though ) : @i = 82000;while ( @i < 82267 ) { if( checkquest(@i) ) goto N_Progress; @i++; }
  19. prontera,161,190,3 script Soul Linker 992,{OnLink:switch ( basejob ) { case Job_Alchemist: set .@spirit, 445; break; case Job_Monk: set .@spirit, 447; break; case Job_Star_Gladiator: set .@spirit, 448; break; case Job_Sage: set .@spirit, 449; break; case Job_Crusader: set .@spirit, 450; break; case Job_SuperNovice: set .@spirit, 451; break; case Job_Knight: set .@spirit, 452; break; case Job_Wizard: set .@spirit, 453; break; case Job_Priest: set .@spirit, 454; break; case Job_Bard: case Job_Dancer: set .@spirit, 455; break; case Job_Rogue: set .@spirit, 456; break; case Job_Assassin: set .@spirit, 457; break; case Job_Blacksmith: set .@spirit, 458; break; case Job_Hunter: set .@spirit, 460; break; case Job_Soul_Linker: set .@spirit, 461; break; default: if ( upper == 1 && baselevel < 70 ) set .@spirit, 494; break;}if ( .@spirit ) { sc_start4 SC_SOULLINK, 360000, 5, .@spirit,0,0; skilleffect .@spirit, 5;}end;OnInit:defpattern 1, "link","OnLink";activatepset 1;end;}
  20. prontera,150,150,0 script Exchanger 100,{ mes .npc$; mes "Hi there, i can trade your 100 TCG's to 10 PODS or 20 Convex Mirror or 15 Jellopy."; next; switch(select(.choice$)) { case 1: if ( countitem(7227) < 100 ) end; delitem 7227,100; getitem 7179,10; break; case 2: if ( countitem(7227) < 100 ) end; delitem 7227,100; getitem 12214,20; break; case 3: if ( countitem(7227) < 100 ) end; delitem 7227,100; getitem 909,15; break; default: break; } OnInit: .npc$ = "[ " +strnpcinfo(1)+ " ]"; .choice$ = "10 PODS:20 Convex Mirror:15 Jellopy"; end;}
  21. This : TRUNCATE TABLE `guild_castle`;
  22. LAN only. If you want to make other players connect with this. You need to port forward your router. What you mean 2 folder branches? pre-re and re?
  23. Try this : prontera,150,150,0 script Sample 100,{ .@npc$ = strnpcinfo(1); .@block_time = 7; // 7 days if ( gettimetick(2) < #timer ) { mes .@npc$; mes "You can only talk to me once a week"; .@time_left = ( ( #timer - gettimetick(2) ) / 60 ); mes "Time left : " +.@time_left+ " minutes"; close; } mes .npc$; mes "Talk to me again after " +.@block_time+ " days."; #timer = gettimetick(2) + ( .@block_time * 24 * 60 * 60 ); close;}
  24. I attach 2010-07-30 client at my first post the problem is you need a lua files that is compatible to that client date and a clean data folder
×
×
  • Create New...

Important Information

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