Jump to content

roprontera

Members
  • Content Count

    7
  • Joined

  • Last visited


Reputation Activity

  1. Upvote
    roprontera reacted to Daifuku in Daifuku | Graphics, Sprites, Maps, Wiki, Forum, Advertising, Scripts & more   
    contact me on facebook!           join discord for freebies!


    welcome to my paid services. 
    below you can find a variety of things I can do to make your server stand out!
    if you need anything else, just ask. 
     

    Logo 25$* Patcher 20$* Animated Banner 10$* Advertising Banner 10$* Loading Screen 2$* Login Screen 5$* Facebook Banner + Profile 10$* Forum Skin 30$* Wiki Skin 20$* Interface Skin 20$* Website 30$* Icons 2$* *Please note that prices listed are for re-sellers and come without PSD. 
    *For exclusive graphics with or without PSD please ask for a quote. 

     
     
    Advertising 10$/week*  Wiki Editor 20$/week*   Support GM 20$/week*  Event GM 20$/week*  Fast Refresh Client 50$*  Normal Client 10$*  FluxCP Setup 10$*  Scripts 5$*  Singature 5$*   

    well, that was pretty much all I could think of.
    for a preview of my works please check the second post below!
    if you need anything else, just ask. 
  2. Upvote
    roprontera got a reaction from Daifuku in Daifuku | Graphics, Sprites, Maps, Wiki, Forum, Advertising, Scripts & more   
    She is the best graphic designer I have ever seen.
    Fast response in Skype, actually she is always there and response just in a sec.
    She really cares about how you feel and she got the sense about design.
    She changed the design very quick but also keep the high quality to meet my requirement. 
    Overall, if everyone wants a high quality, fast delivery, low price, good communication, responsible, nekomimi and elf ears graphic designer, she is the best choice.
    Highly recommended
  3. Upvote
    roprontera reacted to Ridley in How to use string as a value in script?   
    i am not exactly sure what are you trying to do. About strings 
     
    setarray(.@type$[0], "Whatever", "Words", "Going ", "Here");  strings you use for words and letters, for items you want an array, but not a string
    setarray(.@item[0], 501, 502, 503);  but for items, you can also use it's aegis name (constant)
    setarray(.@item[0], Red_Potion, Orange_Potion, Yellow_Potion);   this would call the related id, so even tho using the names here, it is still considered variables.
     
    To say it simple: strings = words, variables = numbers
     
    about your script:
     
    OnInit: setarray $@type1,501,502,503,504,505; setarray $@type2,506,507,508,509,511;  You store it as a global, temporary variable, which isn't needed at all here. Neither it is required to call it oninit, better call it when it is actually needed. I would do it when that part of the script is called.
     
    }else ; this is... well.. remove it
    set .@randType$, "$@type2"; this is your actual problem. Your setting a string to a variable, also it's not specified which value of the array should be called. I think you want people to get 1 item out of 1 of those 2 random groups? There is actually no need to store them in arrays, i thin F_Rand comes in hany here
     
    prontera,50,50,3 script seller 50,{ .@i = rand(1) // sets .@i randomly to either 0 or 1 if (.@i) getitem(callfunc("F_Rand", Red_Potion, Orange_Potion, 503)); // if .@i has a value get 1 random item, you can use constants or ID's else getitem(callfunc("F_Rand", Green_Potion, Red_Herb, 508 )); // and these if .@i is 0 end; }  
    This would pretty much do what you want. Note: Even i use constants here for item id's, these are still considered variables (id's)
     
    Now back to your question regarding strings.
    .@i$ = "This is a string";  or in an array
    setarray(.@i$[0], "We", "are", "all", "strings");  in an array you can store several informations, strings or variables. 
     
    note: in an array, the index starts at 0, not at 1, this means
    .@i$[0] = We
    .@i$[1] = are
    .@i$[2] = all
    .@i$[3] = strings
     
    you can also return the whole array like
    implode(.@i$, " "); //this retuns all entries of the array, so its "We are all strings" Pick a random string
    .@i$[rand(3)] // because index starts at 0, and rand(3) means random 0, 1, 2, or 3   
    Note: i use .@ as temporal npc variables, this means they got deleted again once the npc finished and you don't waste memory to perm save it
    Note 2: .@i$ is just an example, you can use any name you want for your strings or variables
     
    about name of items, you can use getitemname. This works either with the ID or with the constant
    getitemname(501) or getitemname(Red_Potion), you can also youe it for your arrays
     
    setarray(.@items[0], Red_Potion, Yellow Potion, Orange Potion); .@r = rand(2); // .@r is either 0, 1, or 2 getitem(.@items[.@r]), 1; // you get your item from the array mesf("Congratiulations, you got a %s", getitemname(.@r)); //it receives the name of the item mesf is how we use it if you want do it with huld, you put %s as a placeholder for strings, %d as placeholder for variables, then after the comma you call them. If you want to do it the old way, you do
     
    mes("Congratulations, you got a "+getitemname(.@r)+"");   
    same applies for arrays with variables, so if you really want to store them
     
    setarray .@items[0], 501, 502, 503, 504, 505; // .@items[0] is 501 and .@items [4] is 505 getitem .@items[rand(4], 1; // random item 0, 1, 2, 3 or 4  .@items[rand(4)] // because index starts at 0, and rand(3) means random 0, 1, 2, or 3 
×
×
  • Create New...

Important Information

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