meko

Core Developers
  • Content count

    200
  • Joined

  • Last visited

  • Days Won

    15

meko last won the day on September 20

meko had the most liked content!

4 Followers

About meko

  • Rank
    Advanced Member

Contact Methods

  • IRC Nickname
    meko

Profile Information

  • Gender
    Not Telling
  1. https://www.amazon.com/dp/B00Z0TMEBY/ref=cm_sw_r_cp_awdb_GlcXzbXXW74RF https://www.amazon.com/dp/1118999878/ref=cm_sw_r_cp_awdb_vmcXzbQ19THTQ
  2. Update: September 19 2017 Projects merged: RoDEX Contributors: @KirieZ @hemagx @Asheraf @Dastgir @Smoke @4144 @Haru Item DB enhancements Contributors: @Haru @Ragno New script commands: getdatatype getcalendartime rodex_sendmail rodex_sendmail2 rodex_sendmail_acc rodex_sendmail_acc2 Modified script commands: getgroupid Deprecated script commands: useatcmd superseded by atcommand
  3. sd->inventory_data[i].type
  4. As of September 18 2017, the useatcmd() command has been deprecated. If you were using useatcmd() for built-in @commands you can simply replace it with atcommand(): useatcmd("@command") ➜ atcommand("@command") If you were using useatcmd() for custom @commands (registered with bindatcmd()) you can use doevent() instead: useatcmd("@custom") ➜ doevent("MyNPC::OnUseCommand"); MyNPC is the name of the NPC in which you used doevent() OnUseCommand is the event you registered with doevent() Edge cases: useatcmd(), unlike atcommand(), uses the group id of the attached player rather than running with admin privileges. If you need to check whether or not a player should be able to use a command, use can_use_command() if (can_use_command("@foobar")) { atcommand("@foobar"); } else { dispbottom("You cannot use this command!"); }
  5. [email protected] = getunits(BL_PC, [email protected][0], "map_name"); for ([email protected] = 0; [email protected] < [email protected]; [email protected]) { addtimer(0, "npc::event", [email protected][[email protected]]); } You can use a timer of 0 ticks if you want it instantly
  6. To trigger a npc for everyone in the map use getunits() combined with addtimer(). You can also use maptimer() from the area timer functions. To move a npc, use unitwarp()
  7. Hi there, I refactored your script rothyr,210,146,4 script Styliste#rot 2_M_DYEINGER,{ function changeSingleStyle { [email protected] = getlook(getarg(0)); [email protected] = getarg(1); do { setlook(getarg(0), [email protected]); mesf("C'est le style #%i.", [email protected]); select(([email protected] + 1) <= getarg(2) ? "Suivant" : "", ([email protected] - 1) >= getarg(1) ? "Précédent" : "", "Aller à...", [email protected] > getarg(1) ? "Aller au début" : "", [email protected] < getarg(2) ? "Aller à la fin" : "", "Parfait!", "Annuler!"); switch (@menu) { case 1: [email protected]; break; case 2: [email protected]; break; case 3: input([email protected], getarg(1), getarg(2)); break; case 4: [email protected] = getarg(1); break; case 5: [email protected] = getarg(2); break; case 7: setlook(getarg(0), [email protected]); // fallthrough case 6: mes("Ok, c'est fait."); mes("Besoin d'autre chose?"); next(); return; } } while (true); } function changeAllStyles { setarray([email protected][0], getlook(LOOK_HAIR), getlook(LOOK_HAIR_COLOR), getlook(LOOK_CLOTHES_COLOR)); do { if (getarg(0)) { setlook(LOOK_HAIR, rand(.min_style, .max_style)); setlook(LOOK_HAIR_COLOR, rand(.min_color, .max_color)); setlook(LOOK_CLOTHES_COLOR, rand(.min_cloth, .max_cloth)); } else { mes("Veuillez entrer le N° de couleur de vêtement:"); input([email protected], .min_cloth, .max_cloth); setlook(LOOK_CLOTHES_COLOR, [email protected]); mes("Veuillez entrer le N° de style de cheveux:"); input([email protected], .min_style, .max_style); setlook(LOOK_HAIR, [email protected]); mes("Veuillez entrer le N° de couleur de cheveux:"); input([email protected], .min_color, .max_color); setlook(LOOK_HAIR_COLOR, [email protected]); } mesf("Vous avez présentement la coupe #%i de couleur #%i, avec des vêtements de couleur #%i.", getlook(LOOK_HAIR), getlook(LOOK_HAIR_COLOR), getlook(LOOK_CLOTHES_COLOR)); select("Recommencer", "Parfait!", "Annuler!"); switch (@menu) { case 3: setlook(LOOK_HAIR, [email protected][0]); setlook(LOOK_HAIR_COLOR, [email protected][1]); setlook(LOOK_CLOTHES_COLOR, [email protected][2]); case 2: return; } } while (true); } cutin("job_alche_vincent", 2); mesf("[ %s ]", strnpcinfo(NPC_NAME)); // OnClick mes("Bonjour, que puis-je faire pour vous?"); next(); do { mesf("Vous avez présentement la coupe #%i de couleur #%i, avec des vêtements de couleur #%i.", getlook(LOOK_HAIR), getlook(LOOK_HAIR_COLOR), getlook(LOOK_CLOTHES_COLOR)); select("Couleur de vêtement", "Coupe de cheveux", "Couleur de cheveux", "Tout changer d'un coup", "Au hasard", "Quitter"); switch (@menu) { case 1: changeSingleStyle(LOOK_CLOTHES_COLOR, .min_cloth, .max_cloth); break; case 2: changeSingleStyle(LOOK_HAIR, .min_style, .max_style); break; case 3: changeSingleStyle(LOOK_HAIR_COLOR, .min_color, .max_color); break; case 4: changeAllStyles(false); break; case 5: changeAllStyles(true); break; default: close; } } while (true); OnInit: .min_style = max(1, getbattleflag("min_hair_style")); .max_style = getbattleflag("max_hair_style"); .min_color = max(1, getbattleflag("min_hair_color")); .max_color = getbattleflag("max_hair_color"); .min_cloth = max(1, getbattleflag("min_cloth_color")); .max_cloth = getbattleflag("max_cloth_color"); } Down from 326 lines to just 121 lines, while still preserving functionality and while avoiding the goto spaghetti
  8. phpmyadmin has nothing to do with linux users; it is a tool to administer your sql databases also Hercules does not ship pre-built binaries so just checkout another commit and compile it, but since you are trying to do this only to run Hercules as root I would highly discourage doing so
  9. First of all, please tell us what error you encounter while compiling the most recent version of Hercules, this way we can fix it. If you absolutely must use an older version then you will have to clone the repository using git clone and then check out an older commit (any commit) using git checkout: git clone https://github.com/HerculesWS/Hercules.git cd Hercules git checkout abcdef0 replace abcdef0 with the sha1 hash of the commit you wish to use
  10. You do this through SSH, not a web-based control panel (although it might have that feature, not sure). You have to generate a SSH key and add it to your host, then open a terminal and connect to the host using your key. If your web-based control panel has a built-in terminal emulator you could use that too
  11. https://www.digitalocean.com/community/tutorials/how-to-create-a-sudo-user-on-centos-quickstart https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s2-users-add.html
  12. I guess this could be added to HUSS, feel free to suggest it in the comments: https://github.com/HerculesWS/Hercules/pull/1763
  13. Hercules does not have a command to put items directly in storage so just use getitem/getitem2 and remove the storeitem/storeitem2. The use of checkweight guarantees it can be put in the inventory so you don't need to mess with storage anyway
  14. the checkweight() command now checks for both weight and inventory space so you can use that instead of the custom checkspace() Btw your terminal font makes it very hard to differentiate between parentheses and angle brackets. You could try the following: https://github.com/adobe-fonts/source-code-pro https://github.com/mozilla/Fira If you use Powerline they also offer their own patched fonts: https://github.com/powerline/fonts
  15. Also, don't forget to check if the item can be carried by the player: if (countitem(501) >= 1) { mes("you have the requested item"); if (!checkweight(502, 1)) { mes("...but you can't carry it!"); } else { delitem(501, 1); getitem(502, 1); } } else { mes("you don't have anything"); } close; And instead of 501 / 502 you should use constants