I love Gump's and have been trying to use clilocs when and where ever possible, with that said I only know of one way to utilize clilocs and that is through an html gump element. Below are two example Gump's, well they're not just throw away, I put them in my boat pkg to replace the character direction facing to determine how a ship is facing when it is used. In them you'll see the use of cliloc numbers, the second is a replacement drydock gump, which I like better than just the yesno that was being used.
Code: Select all
function ForShipFacing( mobile )
var gump := GFCreateGump();
GFClosable(gump, 0);
GFDisposable(gump, 0);
GFPage(gump, 0);
GFResizePic(gump, 15, 15, 9200, 220, 180);
GFResizePic(gump, 25, 25, 3000, 200, 160);
GFResizePic(gump, 35, 35, 3000, 180, 80);
GFAddButton(gump, 35, 120, 4005, 4007, GF_CLOSE_BTN, 1);
GFAddButton(gump, 130, 120, 4005, 4007, GF_CLOSE_BTN, 2);
GFAddButton(gump, 35, 150, 4005, 4007, GF_CLOSE_BTN, 3);
GFAddButton(gump, 130, 150, 4005, 4007, GF_CLOSE_BTN, 4);
GFAddHTMLLocalized(gump, 39, 39, 170, 70, 1116329);
GFTextLine(gump, 70, 120, 0, "WEST");
GFTextLine(gump, 165, 120, 0, "NORTH");
GFTextLine(gump, 70, 150, 0, "SOUTH");
GFTextLine(gump, 165, 150, 0, "EAST");
var input := GFSendGump(mobile, gump);
var flag;
input := input[0];
case( CInt( input ))
1: flag := CRMULTI_FACING_WEST;
break;
2: flag := CRMULTI_FACING_NORTH;
break;
3: flag := CRMULTI_FACING_SOUTH;
break;
4: flag := CRMULTI_FACING_EAST;
break;
Default: SendSysMessage(mobile, "Cancelled.");
break;
endcase
return flag;
endfunction
function ConfirmDryDock( mobile )
var gump := GFCreateGump();
GFPage(gump, 0);
GFResizePic(gump, 15, 15, 5054, 220, 170);
GFResizePic(gump, 25, 25, 3000, 200, 150);
GFAddHTMLLocalized(gump, 35, 35, 180, 80, 1018319, 1, 0); //Do you wish to dry dock this boat?
GFAddButton(gump, 35, 115, 4005, 4007, GF_CLOSE_BTN, 1);
GFAddButton(gump, 35, 140, 4005, 4007, GF_CLOSE_BTN, -1);
GFAddHTMLLocalized(gump, 70, 115, 140, 25, 1011011); //CONTINUE
GFAddHTMLLocalized(gump, 70, 140, 140, 25, 1011012); //CANCEL
var input := GFSendGump(mobile, gump);
if( !input )
SendSysMessage( mobile, "Canceled." );
return 0;
endif
var response;
input := input[0];
case( CInt( input ))
1: response := 1;
break;
2: response := 0;
break;
endcase
return response;
endfunction