Jump to content

Matheus

Members
  • Posts

    63
  • Joined

  • Last visited

Posts posted by Matheus

  1. Here one example Epoque, with multiple configs, i don't know if this is right, but is just a example:

    function script configSystem {
    explode(.@_config, getarg(0), ",");
    switch(.@_config[0])
    {
     case "useZeny":
      $zenyCost = .@_config[1];
      break;
    
     case "itemID":
      $itemID = .@_config[1];
      break;
    
     case "itemAMOUNT":
      $itemAMOUNT = .@_config[1];
      break;
    }
    }
    - testScript -1,{
    OnPCLoginEvent:
     configSystem("useZeny,5000");
     configSystem("itemID,678");
     configSystem("itemAMOUNT,678");
    
    if(($zenyCost) && zeny < $zenyCost){
     mes "Zeny is necessary !";
     close;
    }
    else
    {
     getitem $itemID, $itemAMOUNT;
     mes "Here is your item!";
     close;
    }
    
    }

  2. Hi, it's me again (haha), i think it is be nice if you guys (core developers), it's make switch accept words and numbers (now, just accept numbers ..), for example:

    switch(getarg(0)){
    
    case 'mes':
    mes getarg(1);
    break;
    
    case 'getitem':
    getitem getarg(1), 1;
    break;
    
    }

    and again: sorry for my bad english.

    • Upvote 3
  3. - script sample -1,{
    function func_sample;
    
    func_sample(param1,param2,...);
    
    function func_sample {
    blablabla getarg(0) blabla getarg(1)...
    }
    }

    I think @Dreaming means is the global side of that function since it can only be use inside the script (hope Iam right).

    Yes !! With that, you can use one function, with 9999999999999 scripts and use each function without putting them on everyone
  4. callfunc in my opinion is ugly, and tr0n, i know you can't call a function just by her name, that's why i created this topic, to see if some core developer can do it

  5. for god sake tr0n, i know that, i'm scripter, i know you can call that function, but need of "callfunc", i want call the function JUST WITH THE NAME !

    again: sorry for my bad english

  6. Yes, but the function should be inside the script. If the functions being called just by their names, out stead of changing the source, you can do with scripts (and you can create a lot of library's too, make the work of create a script, easier).

    sorry for my bad english.

  7. function call with script should be called like C, just the name of the function with the params, example:

    functioname(param1, param2, param3...);

    Much more easy in my vision .. this will make the emulador be more slowly ?

    ps: sorry for my bad english

×
×
  • Create New...