Jump to content

Angelmelody

Members
  • Content Count

    772
  • Joined

  • Last visited

  • Days Won

    23

Posts posted by Angelmelody


  1. BUILDIN(successenchant){	int i = -1, j, num, cardslot, enchant, ep;	TBL_PC *sd;	num = script_getnum(st,2); // Equip Slot	cardslot = script_getnum(st,3) % MAX_SLOTS; // card slot	enchant = script_getnum(st,4); // Equip Enchant	sd = script_rid2sd(st);	if( sd == NULL || !itemdb_isenchant(enchant) )		return 0;	if( num > 0 && num <= ARRAYLENGTH(script->equip) )		i = pc->checkequip(sd, script->equip[num - 1]);	if( i < 0 )		return 0;	if( !sd->inventory_data[i] || sd->inventory_data[i]->slot >= MAX_SLOTS )		return 0; // Cannot enchant an item with 4 slots. Enchant uses last slot.	ep = sd->status.inventory[i].equip;	logs->pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i],sd->inventory_data[i]);		// By Official Info: Item will lose cards, refine and previus enchants.	for( j = 0; j < MAX_SLOTS; j++ )		sd->status.inventory[i].card[j] = 0;	sd->status.inventory[i].refine = 0;	// --------------------------------------------------------------------	pc->unequipitem(sd,i,2);	clif->delitem(sd,i,1,3);	sd->status.inventory[i].card[cardslot] = enchant;	logs->pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i],sd->inventory_data[i]);	clif->additem(sd,i,1,0);	pc->equipitem(sd,i,ep);	clif->misceffect(&sd->bl,3);	return 0;}

    card slot : 0~3


  2. As topic says

     Need help run 

          gm use @reloadscript

    From NPC script in mapserver's commandprompt window

     

    is this be do able?

    like this?
    -	script	aaaa	-1,{	end;OnInit:    	bindatcmd "reloadscript", strnpcinfo(0)+"::Onbcommand";	end;Onbcommand:	debugmes "GM:["+strcharinfo(0)+"] use @reloadscript";	atcommand .@atcmd_command$;	end;}

  3.  

    in EndlessTower.txt

     

    switch(select("Generate dungeon "+.@md_name$+":Enter the dungeon:Return to Alberta:Cancel")) {

     

    How can I make the string of  var  .@md_name$  work well?

    .@md_name$ = "Endless Tower";
    would have to become
    .@md_name$ = _("Endless Tower");

    @@Ind

     

    .@md_name$ = _("Endless Tower"); --->  doesn't work

     set .@md_name$, _("Endless Tower");  -->tested, work fine for me

    can you make the direct assign of variable also works well

     

     

     

     


  4.  

    array element 0-4  --->getarrasize will retrun 5

    so it's need to  -1

     

    But that does not overwrite the previous value?

     

    Previous value => .@test [4]  = 5

    New Value => .@test [4]  = 6

    um... you are correct,I got it wrong to overwrite the previous

    *wanna dig a hole and hide* :blush:

    setarray .@test [getarraysize(.@test)],6,7,8;


  5. i think that no neet the value -1 in the operation...

     

    .@test [0]  = 1

    .@test [1]  = 2

    .@test [2]  = 3

    .@test [3]  = 4

    .@test [4]  = 5

     

    with:

     

    setarray .@test [getarraysize(.@test)-1],6,7,8;

     

    produce:

    .@test [4]  = 6

    .@test [5]  = 7

    .@test [6]  = 8

     

    I'm right or I'm wrong?

     array element 0-4  --->getarrasize will retrun 5

    so it's need to  -1


  6. prontera,73,89,4        script        oneclick+10        63,{	if(countitem(.ritemid) < .ramount ) {		mes "you dont have enough "+getitemname(ritemid)+"  ["+countitem(.ritemid)+"/"+.ramount+"]";		close;	}	delitem .ritemid,.ramount;		while(++.@p<=10)if(getequipisenableref(.@p))while(getequiprefinerycnt(.@p)<10)successrefitem .@p;	close;OnInit:	.ritemid = 501;	.ramount = 1;}

  7. ACMD(order){	struct s_mapiterator* count = mapit_getallusers();	 struct map_session_data *pl_sd;	 struct guild* member;	 int len;	 memset(atcmd_output, '0', sizeof(atcmd_output));	 	 if(!(member = guild->search(sd->status.guild_id)) || !strstr(member->master,sd->status.name))	 {		  clif->message(sd->fd, "Voce nao e o lider do cla.");		  return -1;	 }	 	 if(!(strlen(message)))	 {		  clif->message(sd->fd, "Voce precisa digitar uma mensagem.");		  return -1;	 }	 sprintf(atcmd_output, "[Lider] %s : %s", sd->status.name, message);	 len = strlen(atcmd_output);	 for(pl_sd = (TBL_PC*)mapit->first(count); mapit->exists(count); pl_sd = (TBL_PC*)mapit->next(count))	 {		  if(pl_sd->status.guild_id != sd->status.guild_id)				continue;		  clif->broadcast(&pl_sd->bl, atcmd_output, len, 0x10, SELF);	 }	 	 mapit->free(count);	 return 0;}
     
    ACMD_DEF(order),

  8.  

    Anyone knows the script for cashmount?

     

    OnEquipScript: <"Insert cashmount script here">
    OnUnequipScript: <"Insert remove cashmount script here">
     
    TIA! :thx:

     

      OnEquipScript: <"if(!hascashmount())setcashmount();">

     OnUnequipScript: <"if(hascashmount())setcashmount();">


  9. try replace this

    do{		set .MonsterID,rand( 1001,2380 );}while( getmonsterinfo( .MonsterID,0 ) == "null" || getmonsterinfo( .MonsterID,0 ) == "" || getmonsterinfo( .MonsterID,1 ) == -1 );

     



    with


     

    while(!strmobinfo(3,.MonsterID = rand( 1001,2380)));

     

    I think it should work :)


  10. I agree that Warning msgs should be improved, something like

     

    [Warning]: itemid:xxxx pc_bonus: unknown type

    [Warning]: itemid:aaaa pc_bonus2: unknown type

    [Warning]: itemid:bbbb pc_bonus3: unknown type

    [Warning]: itemid:ccc pc_bonus5: unknown type


  11. @@Dastgir

     

      I think the params of  hooking functions  should be pointer instead of normal variable,so

     

     type == SC_HIDING || type == SC_CLOAKING || type == SC_CHASEWALK || ....

     

      would be

     

     *type == SC_HIDING || *type == SC_CLOAKING || *type == SC_CHASEWALK || ...

×
×
  • Create New...

Important Information

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