Jump to content

GmOcean

Community Contributors
  • Content Count

    371
  • Joined

  • Last visited

  • Days Won

    8

Posts posted by GmOcean


  1. Why not just use /effect ? Doesn't this just turn effects off?

     

    If not, you can try this, but not sure if it'll work as you want it to, think it's user based:

     

    Well, simplest way would be to assign a variable to a player, and then just end execution before the effect is displayed.

     

    For the command, just add this in there. This will set a player's variable to 1 to turn effects off, or 0 to turn effects back on.

    if (pc_readglobalreg(sd, script->add_str("disable_effect")))    pc->setregistry(sd, script->add_str("disable_effect"),0;else    pc->setregistry(sd, script->add_str("disable_effect"),1;

     

    Then, for clif_speacialeffect, all you need to do is add a check to see if they have the variable set to 1. If it is, you just end the execution early, so that no effect is displayed, but if it's 0, then continue with execution.

    void clif_specialeffect(struct block_list* bl, int type, enum send_target target){unsigned char buf[24];nullpo_retv(bl);if (pc_readglobalreg(sd, script->add_str("disable_effect")))    return;memset(buf, 0, packet_len(0x1f3));WBUFW(buf,0) = 0x1f3;WBUFL(buf,2) = bl->id;WBUFL(buf,6) = type;clif->send(buf, packet_len(0x1f3), bl, target);if (disguised(bl)) {WBUFL(buf,2) = -bl->id;clif->send(buf, packet_len(0x1f3), bl, SELF);}} 

     

    Like I said, this is the easiest way, but truthfully, I don't think this will work as you want. If i'm not mistaken, all this will do is prevent that selected player, from using the effect. In other words, when he/she uses a skill, no effect will show, but if another player uses a skill, then theirs will show.


  2. It depends, if you want it to work for ALL healing items, then your best bet is a src edit.

    However, if you only want to make a select few items have this effect, you can do so with script code.

     

    Example of the latter:

    This is the original Item for 607 (Yggdrasilberry).

    {	Id: 607	AegisName: "Yggdrasilberry"	Name: "Yggdrasil Berry"	Type: 0	Buy: 5000	Weight: 300	BuyingStore: true	Delay: 5000	Script: <" percentheal 100,100; ">},

     

    This is the modified version to fit your request:

    {	Id: 607	AegisName: "Yggdrasilberry"	Name: "Yggdrasil Berry"	Type: 0	Buy: 5000	Weight: 300	BuyingStore: true	Delay: 5000	KeepAfterUse: true	Script: <" if (readparam(Hp) == readparam(MaxHP) || readparam(Sp) == readparam(MaxSP)) { end; }			   else { percentheal 100,100; delitem 607,1; } ">},

     

    You'll notice the KeepAfterUse: true

    this will prevent the item from being deleted upon using it, even if they had maxHP/SP.

    Then if they weren't, we heal them, and manually delete the item.


  3. Find this:

    if (@HD > gettimetick(2)) end;

     

    and replace with this:

    	if (@HD > gettimetick(2)) {		message strcharinfo(0),"Please wait: "+callfunc("Time2Str",@HD)+"";		end;	}

     

    That should make it display how much longer they need to wait before getting healed.


  4. Okay, so I thought about putting this in Source Support, but I'm not quite confident enough that I'd be able to complete this even if support was provided. That being said, don't hesitate to give support, I'll still try and do my part.

     

    Alright, so like the topic title says, I'm looking to make a Second Inventory. Surely this would have to be possible, granted I know displaying it in-game is another matter altogether. This is besides the point, I don't plan on having the second inventory space being accessible by players, strictly through NPC/SRC.

     

    Namely through the use of clif_sellitem. To be more specific, it's to create a Buyback feature. I've made a completely beta-working version before here: http://herc.ws/board/topic/7225-npc-buysell/?p=43831

    However due to clif_sellitem using the inventory to produce a list of items, I came to the conclusion the current method was lacking something, especially since it fills a player's inventory up with items taking up space. Thus the idea for a Second Inventory.

     

    Theoretically if there were to exist a second inventory, accessible through script commands, I'd be able to place those items there. And then have clif_sellitem pull information from the second inventory rather than the first to create the list of items. Though, this is all speculation and hasn't been tested. I'm not sure exactly how the packet's handle it in this case. Meaning even if I provide the location for the list to be pulled from, it doesn't necessarily mean that the client will use the second inventory.

     

    Anyone with a vast knowledge of src, know if this is possible, and how to go about it?


  5. Used to let the patcher know it's a button:

    [Button:Exit]

    Images to determine what the patcher should display upon (Default 'nothing', OnHover 'Mouse over button', OnDown 'Mouse clicking on button/Held down on button')

    Default='images/close_default.png'OnHover='images/close_hover.png'OnDown='images/close_down.png'

    Actual button location, moving from Bottom-Left location out-towards top-right (Atleast, I think thats the way the button travels).

    Left=577Top=190

    Tells the patcher what this button does, this code is already hardset in the code if i'm not mistaken, basically just says to close the patcher lol.

    Hook='Exit'

     

    Although, I doubt this is what you were asking xD

     

    @OnTopic - I actually like the first one a lot. I'd give it a solid 8.5/10 (guess that's not so solid since it has half a point).


  6. I want to say Yes and No. Without looking directly at the srouce code, I can't give you a definite answer. However, I believe that it is possible to edit the code so that it accepts TCG as a form of currency, however displaying the amount of TCG you have on hand is a different matter all together.


  7. Heres a rough draft of your request. You should be able to mess around with it to do what you want.

    prontera,150,160,4	script	NpcName	123,{if ($emperium_donation < 100) {	.@needed = 100 - $emperium_donation;	mes "This dungeon is still locked.",	    "We need more donations to unlock it.",	    "We accept donations in the form of Emperiums.";	next;	mes "We need, "+ .@needed +" more donations.";	mes "Can you support us?";	next;	if (select("Yes, I'd like to donate.", "Sorry, maybe another time.") == 2) {		close;	}	mes "How many Emperiums would you like to donate?";	next;	switch(select("1 Emperium", ((.@needed >= 5)?"5 Emperium":""), ((.@needed >= 10)?"10 Emperium":""))) {		case 1:			mes "Are you sure you want to donate 1 Emperium?";			next;			if (select("Yes, take it.", "No, I change my mind.") == 2) {				close;			}			if (!countitem(714)) {				mes "I'm sorry, but you don't have any Emperium";				close;			}			delitem 714,1;			++$emperium;			break;		case 2:			mes "Are you sure you want to donate 5 Emperium?";			next;			if (select("Yes, take it.", "No, I change my mind.") == 2) {				close;			}			if (countitem(714) < 5) {				mes "I'm sorry, but you don't have any Emperium";				close;			}			delitem 714,5;			$emperium += 5;			break;		case 3:				mes "Are you sure you want to donate 10 Emperium?";			next;			if (select("Yes, take it.", "No, I change my mind.") == 2) {				close;			}			if (countitem(714) < 10) {				mes "I'm sorry, but you don't have any Emperium";				close;			}			delitem 714,10;			$emperium += 10;			break;	}	close2;	callsub OnDonation;	end;}mes "All donation requirements have been completed.";mes "Would you like to enter the dungeon?";if (select("Yes, take me there.", "No thank you.") == 2) {	close;}warp "pay_dun00",0,0;close;OnDonation:if ($emperium < 100) { return; }announce "All 100 Emperium Donations have been completed. The dungeon is now able to be accessed!",bc_all|bc_blue;return;end;}

  8. From what I can tell, bitcoin is secure as in it's predicted to only increase in value exponentially from here on out. However, the biggest issue I have with bitcoin really, is it's not a vastly accepted form of currency. And if you wanted to convert your bitcoin to usable currency you can't just do it through sources like paypal. If you could, I'd have jumped on the wagon a long time ago.


  9. Yes, the command I made acts exactly the same way as changebase did, so sadly there's no point in making it.

     

    Also, as for it changing when they logout / login again. Just change their disguise whenever they login, if they have a variable set to 1. Then when their VIP time is up, or whatever determines the length of their disguise, just remove the variable and undisguise them.

    OnPCLoginEvent:if (vip_status) {    changebase(vip_disguise);}end;

  10. I see, alright well I think I know what the problem is. I'll test some more and release a fix if I'm able too.

     

    Edit:

    After, using the command both the original *changebase(<Job_Id>) and the custom one I made *disguiseclass(<Job_Id>)

    they both work exactly the same. That is to say, that yes, the skills do vanish, but they instead just go from the 1st/2nd/trans class, and go to the misc section.

     

    Before changing class:

    screen_Hercules021.jpgscreen_Hercules022.jpg

     

    After Changing Class:

    screen_Hercules023.jpgscreen_Hercules024.jpg

     

     

    So as you can see, you do have your skills, they just get pushed to misc section. This is most likely a client issue than a src one.

     

    And yes, before you ask, you are unable to obtain the skills of the new class you're disguised as, even if you tried.


  11. @Suzuya - It shouldn't have changed your skills and the like. The documentation clearly says, changes only the sprite and nothing else. So your skills should have stayed intact.

    If this is truly the case, can you provide screen shots of it happening? A screen of before you used the command, showing your skills, and then after you used the command and showing your skills.

    Because if this is happening it could be a bug with the command.

     

    Otherwise, your only other option as far as I know, would be to make a custom command, or go the long route of making custom classes that use those sprites, but have the skills of the original class. Basically, making Wizard clones, but using Warlock sprite.


  12. Just add more checks, but use the newer commands in the recent updates. For instance:

    for (.@i = 80003; .@i < 80006; .@i++) {    if (questprogress(.@i)) {        mes "Quest [^0000FF"+ .@i +"^000000] is currently: "+((questprogress(.@i) == 2)?"^0000FFCompleted":(questactive(.@i)?"^FFFF00Inprogress":"^FF0000Inactive"))+"^000000";    } else {        mes "Quest [^0000FF"+ .@i +"^000000] hasn't been started yet.";    }}close;

     

    What that does is check all your quests, one after the other, starting with quest 80003, and ending with 80006.

    1. It'll first check to see if the quest has been obtained.

    2. If it has, it'll check to see if it's completed, if so say it is.

    3. If not completed, check to see whether it's active (inprogress) or inactive.

    4. If it hasn't been obtained yet, say so.

    5. Repeat for all quests.

    6. close;


  13. Well, for starters, your NPC's name is too long. Not that it'd have much affect to your script. Second, are you sure you have that item in your inventory?

    If yes, then are you able to properly create the instance? If not you need to fix that problem first, by checking against the other results instead of just 0. (-1,-2,etc..)

    If yes, are you able to see this dialogue of the npc. If not, you need to attach that NPC to the instance, or specify the instance ID.

    mes "^CC33CCSeems like^000000 ^008800Antonio^000000 ^CC33CCis waiting for you, Watch out for those stubborn^000000 ^008800Minions^000000^CC33CC!^000000 ^CC33CCand^000000 ^008800BEWARE^000000^CC33CC....^000000";

     

    All in all, I'd recommend, combining your warper npc with the first npc. Multiple NPCs that deal with activation and creation of an instance makes things more complicated then they need to be.


  14. Okay, find this in your script:

    set .@size, query_sql("SELECT account_id,char_id FROM `guild_member` WHERE guild_id = '"+.@gid+"' AND "+.@sql$,.@aid,.@cid);for(set .@j,0; .@j<.@size; set .@j,.@j+1) {    if (.Options&8 && !(.Options&4)) {        set .@ip$, replacestr(getcharip(.@aid[.@j]),".","a");	if (getd(".@ip_"+.@i+"_"+.@ip$)) continue;	    setd ".@ip_"+.@i+"_"+.@ip$,1;	}

     

    Firstly, add another query to obtain the mac address based on the player's account ID, after it checks for .options&8

    query_sql("SELECT `mac_address` FROM `table_name` WHERE `account_id`='"+.@aid[.@j]+"'",.@mac);

    You'll have to edit that query to match how it's stored in your sql db.

     

    Then replace this line:

    set .@ip$, replacestr(getcharip(.@aid[.@j]),".","a");

    with this:

    set .@ip$, .@mac$[0];

     

    That should be all that's needed. Should look something like this when you're done:

    set .@size, query_sql("SELECT account_id,char_id FROM `guild_member` WHERE guild_id = '"+.@gid+"' AND "+.@sql$,.@aid,.@cid);for(set .@j,0; .@j<.@size; set .@j,.@j+1) {    if (.Options&8 && !(.Options&4)) {        query_sql("SELECT `mac_address` FROM `table_name` WHERE `account_id`='"+.@aid[.@j]+"'",.@mac$);        set .@ip$, .@mac$[0];	if (getd(".@ip_"+.@i+"_"+.@ip$)) continue;	    setd ".@ip_"+.@i+"_"+.@ip$,1;	}

     

    That should be it really.


  15. That depends on what Harmony does with the MacAddress, if it doesn't store the mac address anywhere, then I'm not sure where to begin. However, if it stores the MacAddress into a sql table, then you can easily just grab it using query_sql command.

×
×
  • Create New...

Important Information

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