Advertisement
rdsedmundo

myhabbo dialog api

Nov 2nd, 2011
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  MyHabbo_Dialog
  3.  Por edi472
  4.  Se souber e for usar deixe os crรฉditos por favor. :)
  5. */
  6. dialog={};dialog.habbo={};dialog.habbo.generate=function(){var a,b="3WZE6HTYBUQI42O8PASJWLZ5XCVYGBNMEHRTRUOPKSDFGJKLX7CVFNM10ID9",c="";len=15;for(a=0;a<len;a++){c+=b.substr(Math.floor(Math.random()*(b.length+1)),1)}str2=Math.floor(Math.random()*Date.now());c=c+"-"+str2;return c};dialog.habbo.close=function(){$(id).remove();Overlay.hide()};dialog.habbo.custom=function(a,c){id=dialog.habbo.generate();b=Dialog.createDialog(id,a,9001,0,-1e3,dialog.habbo.close);Dialog.setDialogBody(b,c);Dialog.makeDialogDraggable(b);Dialog.moveDialogToCenter(b);Overlay.show();return b};dialog.habbo.info=function(a,b,c){Dialog.showInfoDialog(dialog.habbo.generate(),a,b);$$(".dialog-handle")[0].innerHTML=c};dialog.habbo.confirm=function(a,b,c,d,e,f){Dialog.showConfirmDialog(a,{okHandler:function(){try{e()}catch(a){$(this.dialogId).remove();Overlay.hide()}},cancelHandler:function(){try{f()}catch(a){}},headerText:b,buttonText:c,cancelButtonText:d})};dialog.habbo.append=function(a,b){Dialog.appendDialogBody(a,b,true)};dialog.habbo.settext=function(a,b){Dialog.setDialogBody(a,b)};dialog.habbo.setwait=function(a,b,c){if(typeof a=="undefined"||typeof b=="undefined"||c=="undefined"){return}Dialog.setAsWaitDialog(a);setTimeout(function(){dialog.habbo.settext(a,c)},b)}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement